Skip to content

Instantly share code, notes, and snippets.

@kevinejohn
kevinejohn / Etched TX Format
Last active June 2, 2020 23:39
https://etched.page bitcoin transaction file format
https://whatsonchain.com/tx/05757b42770da5ee5835a9156f4e5ed9466b5d320117e222cde9a8661bfc56a8
prettier --write --single-quote --trailing-comma es5 "src/**/*.js"
@kevinejohn
kevinejohn / gist:f551e6e488b4046ac593f080ccb89c74
Last active January 8, 2018 21:43
Run ethereum client on coreos docker image
# Run detatched client in the background
docker run -it --rm -d -p 8545:8545 -p 30303:30303 -v /root/.ethereum:/root/.ethereum --name geth ethereum/client-go
# Connect to client's console
docker run -it --rm -v /root/.ethereum:/root/.ethereum ethereum/client-go attach
# Testing contracts on testnet
docker run -it --rm -v /root/testnet3301/.ethash:/root/.ethash -v /root/script.js:/root/script.js ethereum/client-go --maxpeers 0 --nodiscover --networkid 3301 js /root/script.js 2>> geth.log
@kevinejohn
kevinejohn / gist:e2cf7e25a2c9423659429612480fa6da
Created May 11, 2016 21:09
Upgrade to React-Native 0.25+
find ./src -name '*.js' | xargs | pbcopy
jscodeshift -t ~/Projects/temp/codemod-RN24-to-RN25/transform.js <PASTE>
@kevinejohn
kevinejohn / sync_unit_files.sh
Last active September 3, 2015 09:19
Copy unit files to remote VPS
#!/bin/bash
WEB_IP=$1
rsync --archive --progress --compress ./*.service core@$WEB_IP:/home/core/
ssh core@$WEB_IP sudo cp /home/core/*.service /etc/systemd/system/
ssh core@$WEB_IP sudo systemctl daemon-reload
@kevinejohn
kevinejohn / gist:684942f7e3e40fbe869e
Created July 24, 2015 23:51
Allocating Swap CoreOS
sudo fallocate -l 1G /swap
sudo mkswap /swap
sudo chmod 600 /swap
sudo swapon /swap
@kevinejohn
kevinejohn / index.js
Last active August 29, 2015 14:21
How do I row lock?
sequelize.transaction({
isolationLevel: Sequelize.Transaction.ISOLATION_LEVELS.SERIALIZABLE,
//autocommit: false, ???
}, function (t) {
return Config.findAll({
where: { assigned: false },
transaction: t,
//lock: t.LOCK.UPDATE, ???
//lock: t.LOCK.SHARE, ???
//lock: t.LOCK.KEY_SHARE ???
ssh root@XXX.XXX.XXX.XXX -fNL 12345:localhost:2375
# Forwards local port 12345 to remote port 2375
{
"name": "PROJECT_NAME",
"description": "",
"version": "0.0.2",
"author": "Jeff Barczewski <info@codewinds.com>",
"repository": {
"type": "git",
"url": "http://github.com/jeffbski/PROJECT_NAME.git"
},
"bugs": {

Keybase proof

I hereby claim:

  • I am kevinejohn on github.
  • I am kevinejohn (https://keybase.io/kevinejohn) on keybase.
  • I have a public key whose fingerprint is 97C1 387B F14B 6BDC AABA 06E3 F685 2FFB 8608 97B1

To claim this, I am signing this object: