start new:
tmux
start new with session name:
tmux new -s myname
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| // | |
| // The new assembly support in Solidity makes writing helpers easy. | |
| // Many have complained how complex it is to use `ecrecover`, especially in conjunction | |
| // with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call. | |
| // | |
| // Sample input parameters: | |
| // (with v=0) | |
| // "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad", | |
| // "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200", | |
| // "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a" |
| # Gist example of IB wrapper ... | |
| # | |
| # Download API from http://interactivebrokers.github.io/# | |
| # | |
| # Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
| # | |
| # Note: The test cases, and the documentation refer to a python package called IBApi, | |
| # but the actual package is called ibapi. Go figure. | |
| # | |
| # Get the latest version of the gateway: |
| # Gist example of IB wrapper ... | |
| # | |
| # Download API from http://interactivebrokers.github.io/# | |
| # | |
| # Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
| # | |
| # Note: The test cases, and the documentation refer to a python package called IBApi, | |
| # but the actual package is called ibapi. Go figure. | |
| # | |
| # Get the latest version of the gateway: |
| # An example global gitignore file | |
| # | |
| # Place a copy if this at ~/.gitignore_global | |
| # Run `git config --global core.excludesfile ~/.gitignore_global` | |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll |
| // This is universal, works with Infura -- set provider accordingly | |
| const ethers = require('ethers') | |
| //const provider = ethers.getDefaultProvider('rinkeby') | |
| const provider = new ethers.providers.JsonRpcProvider(process.env.WEB3_URL) | |
| function hex_to_ascii(str1) { | |
| var hex = str1.toString(); | |
| var str = ''; | |
| for (var n = 0; n < hex.length; n += 2) { |
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
| /** | |
| * This little program prints out the url to the AWS console | |
| * generated from the local AWS credentials stored in environment variables: | |
| * AWS_ACCESS_KEY_ID | |
| * AWS_SECRET_ACCESS_KEY | |
| * AWS_SESSION_TOKEN | |
| * | |
| * Steps: | |
| * 1. Create a JSON object | |
| * session = JSON.stringify({ |