This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a = %w(0x514C93eD87939B57Fd25685dDAA356CD2Fa366d4 598750 | |
# 0x541044A1dC881D2652b02e70E3d0286084619937 411875 | |
# 0x8E8F86b0d8C147647C784F15a0f013Af63EB5846 230000 | |
# 0x9431B1E83aCA41228C475012fD805E89B3F5F91D 95625 | |
# 0xfe0d4A265C91F0c382275a50920D4f601EB4C7dD 93750 | |
# 0x62C136D1fef51F41368068a8BAf2334A8c2f8D14 93750 | |
# 0xa7aeCF771Fca086983cfBC481533D949089Bd0Ec 29375 | |
# 0xd332f37Aced58AbdD9a1431dA3f4e090D2A1331B 29375 | |
# 0x89F6187e4B4C7805fba2Cbe55046758B7911e8aD 28437.5 | |
# 0x781D1BD9C0620882a718fC5f6fb28974304FA27E 22187.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cell = Cell.last | |
target = 'ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqtgydapmyadqh2h6lndq3eef52h5uq4nnq827utn' | |
tx = Transaction.new | |
tx.inputs = [cell] | |
tx.cell_deps = [ | |
{ | |
"out_point": { | |
"tx_hash": "0xf8de3bb47d055cdf460d93a2a6e1b05f7432f9777c8c474abf4eec1d4aee5d37", | |
"index": '0x0' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recursively diff two hashes, showing only the differing values. | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license. | |
# | |
# Example: | |
# | |
# a = { | |
# "same" => "same", | |
# "diff" => "a", | |
# "only a" => "a", | |
# "nest" => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.6.2; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.1.0/contracts/token/ERC20/ERC20.sol"; | |
contract Token is ERC20 { | |
constructor () public ERC20("FMyLife Token", "FML") { | |
_mint(msg.sender, 1000000000 * (10 ** uint256(decimals()))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://chronos-st.blogspot.com/2007/12/smalltalk-in-one-page.html | |
http://www.csci.csusb.edu/dick/samples/smalltalk.syntax.html | |
Formal EBNF Specification of Smalltalk Syntax | |
1. Character = ? Any Unicode character ?; | |
2. WhitespaceCharacter = ? Any space, newline or horizontal tab character ?; | |
3. DecimalDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; | |
4. Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | |
| "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* | |
* A minimal Forth compiler in C | |
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com | |
* Release 2014-04-04 | |
* | |
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial | |
* | |
* PUBLIC DOMAIN | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nano = require('nanomsg'); | |
const async = require('async') | |
function createWorker(index) { | |
var worker = nano.socket('rep') | |
const endpoint = 'inproc://worker' + index; | |
worker.bind(endpoint); | |
worker.index = index; | |
worker.on('data', (buf) => { | |
var a = buf.toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am shiningray on github. | |
* I am shiningray (https://keybase.io/shiningray) on keybase. | |
* I have a public key ASB2sATNtdPsmMsCGDEJqYzhArE4fU8xht1gDMk3dWtJego | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- hs.logger.setGlobalLogLevel('debug') | |
local logger = hs.logger.new('focus') | |
hs.timer.doEvery(3, function() | |
local current = hs.mouse.getCurrentScreen() | |
-- hs.rawprint(current) | |
if current and current ~= hs.screen.mainScreen() then | |
local windows = hs.window.orderedWindows() | |
for _, l in ipairs(windows) do | |
if l:screen() == current and l:isStandard() and l:isVisible() then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test | |
def initialize | |
@a = 100 | |
end | |
a = 100 | |
def test1 | |
a | |
end |
NewerOlder