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 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder