Skip to content

Instantly share code, notes, and snippets.

View tcrowe's full-sized avatar
💭
Account archived | See link

Tony Crowe tcrowe

💭
Account archived | See link
View GitHub Profile
@tcrowe
tcrowe / aion-create-account.md
Last active October 9, 2018 20:48
Create Aion account with JavaScript
@tcrowe
tcrowe / aion-compile-solidity.js
Created October 9, 2018 21:26
compile solidity from your aion node
/*
Example how to:
+ add RPC calls into Aion Web3
+ check which languages the node can compile
+ compile a solidity contract
+ inspect results
💪🏼
@tcrowe
tcrowe / mocha.opts
Last active October 16, 2018 20:47
optimize your mocha.opts for bdd
--colors
--reporter spec
--ui bdd
# stop if there's an error
--bail
# give us a full explanation
--full-trace
@tcrowe
tcrowe / decode-aion-keystore.js
Created October 23, 2018 21:42
decode aion binary keystore file using aion-rlp module
/*
use aion-rlp to decode an aion keystore v3 binary encoded file
the output is shown by index
the next step is decrypt aes-128-ctr
*/
@tcrowe
tcrowe / webpack.config.js
Created October 25, 2018 21:23
a decent webpack config with babel and react
/*
# webpack config
npm install webpack webpack-cli uglifyjs-webpack-plugin @babel/core @babel/cli @babel/register @babel/preset-env @babel/preset-react babel-loader react react-dom
https://webpack.js.org
https://webpack.js.org/configuration
*/
@tcrowe
tcrowe / convert-mov-to-gif.sh
Last active November 10, 2018 23:59
Convert QuickTime MOV to GIF
ffmpeg -i incoming.mov -s 300x200 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --dither > outgoing.gif
# https://github.com/chrisjmendez/convert-mov-to-gif
@tcrowe
tcrowe / .stylintrc
Last active November 13, 2018 22:49
.stylintrc with stylus-supremacy
{
"blocks": "never",
"brackets": "never",
"colons": "never",
"commaSpace": "always",
"commentSpace": "always",
"cssLiteral": "never",
"depthLimit": 6,
"duplicates": false,
"efficient": "always",
@tcrowe
tcrowe / telegram-bot.js
Last active November 17, 2018 23:33
start up a new telegram bot using nodejs
/*
# the basic echo bot
Instructions:
+ Pops up the docs in the browser
+ npm docs node-telegram-bot-api
+ Install the bot module
+ npm install node-telegram-bot-api
+ Dump in this code into a JS file like ./index.js
@tcrowe
tcrowe / .eslintrc
Last active November 20, 2018 00:42
.eslintrc with prettier
{
"env": {
"es6": true,
"node": true
},
"plugins": ["prettier"],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
@tcrowe
tcrowe / ssh-host-keys.sh
Created February 6, 2019 21:36
new ssh host keys with "yes" confirmation
# v--automatic yes
yes | ssh-keygen -q -t ed25519 -N '' -f /etc/ssh/ssh_host_ed25519_key
yes | ssh-keygen -q -t rsa -b 2048 -N '' -f /etc/ssh/ssh_host_rsa_key
# what bits do you want? ---^