Skip to content

Instantly share code, notes, and snippets.

Raine Revere raineorshine

Block or report user

Report or block raineorshine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raineorshine
raineorshine / test.txt
Created Oct 4, 2019
Test gist linkability
View test.txt
This is a sample sentence.
That is a tample tentence.
View testrpc.sh
npm rebuild leveldown scrypt;
echo "Starting Testrpc..."
./node_modules/ethereumjs-testrpc/bin/testrpc --port 8545 --account "0xb21e287e6dcb34cf16abb6ce71f7209906c13f763c6415c6b2320eea7688212f, 10000000000000000000000000" --account "0x3ba8150286625233d3154d795527e3cbbc07a135d14392e9485f08d2d555fb3d, 10000000000000000000000000" &
testrpc_pid=$!
sleep 5;
karma start config.karma.js
echo "Shutting down TestRpc..."
kill -9 $testrpc_pid
./node_modules/.bin/electron-rebuild;
View ncu-444-output.sh
> npm-check-updates@2.14.2 test /Users/raine/projects/npm-check-updates
> npm run lint ; mocha && mocha test/individual
> npm-check-updates@2.14.2 lint /Users/raine/projects/npm-check-updates
> eslint bin lib test
npm-check-updates
@raineorshine
raineorshine / accumulate.js
Created Nov 9, 2017
accumulate(): Executes an array of promises or promise-returning functions serially and reduces the results with the given accumulator
View accumulate.js
const waterfall = require('promise.waterfall')
const Bluebird = require('bluebird')
const _ = require('lodash')
// an array of 10ms functions with different return values
const functions = [
() => Bluebird.delay(10, 'a'),
() => Bluebird.delay(10, 'b'),
() => Bluebird.delay(10, 'c')
]
@raineorshine
raineorshine / commit-author.sh
Created Oct 12, 2017
Set git commit author for a single repository
View commit-author.sh
git config user.name "ShapeShift-Public"
git config user.email "mail@hshapeshift.io"
https://help.github.com/articles/setting-your-username-in-git/#setting-your-git-username-for-a-single-repository
View keybase.md

Keybase proof

I hereby claim:

  • I am raineorshine on github.
  • I am raineorshine (https://keybase.io/raineorshine) on keybase.
  • I have a public key ASDmUNgDNwUm5tB0gK8u8hFbHKsUKuFSXHhQjg889aByeQo

To claim this, I am signing this object:

@raineorshine
raineorshine / sendRawTransaction.js
Last active Nov 1, 2019
Sends a raw transaction with web3 v1.2.2, ethereumjs-tx v2.1.1, and Infura
View sendRawTransaction.js
const Web3 = require('web3')
const Tx = require('ethereumjs-tx').Transaction
// connect to Infura node
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/INFURA_KEY'))
// the address that will send the test transaction
const addressFrom = '0x1889EF49cDBaad420EB4D6f04066CA4093088Bbd'
const privateKey = new Buffer('PRIVATE_KEY', 'hex')
View rinkeby-faucet
0x26c3103d96a7c87698e87f5bf2db2ac8152997ff
View pack-storage.sol
contract MyContract {
User user;
mapping (address => User) public users;
uint40 time; // cast to 5 bytes - packed with user
address addr1; // 20 bytes - packed with time
address addr2; // 20 bytes - unpacked, one slot
struct User {
You can’t perform that action at this time.