start new:
tmux
start new with session name:
tmux new -s myname
| Exchanges and web wallets do not need "cold" and "hot" storage. They need 2-of-3 multisig lock. | |
| 1. User's funds are locked on 2-of-3 multisig transaction (P2SH or directly, does not matter). | |
| 2. Key A belongs to user (similarly to Blockchain.info, service may backup the encrypted key, but user loses key when forgets the password). | |
| 3. Key B is stored on web server, unencrypted. | |
| 4. Key C belongs to technical staff of the service. This key is encrypted by staff's password and only stored on personal computers of the staff. |
| server { | |
| listen 127.0.0.1:9000; | |
| location / { | |
| proxy_pass http://unix:/var/run/docker.sock:/; | |
| } | |
| } |
| #!/bin/bash | |
| DEV_PATH="~/dev/myapp" | |
| SESSION="myapp" | |
| tmux -2 new-session -d -s $SESSION | |
| # First window (backend dev) | |
| tmux rename-window "Backend" | |
| tmux send-keys "cd $DEV_PATH; vim" C-m | |
| # Frontend window for vim |
| var Base64 = function(){}; | |
| Base64._rixits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_"; | |
| Base64.toHash = function( n ) { | |
| if( isNaN(Number(n)) || n===null || n===Number.POSITIVE_INFINITY || n<0 ) throw "The input is not valid"; | |
| n = Math.floor( n ); | |
| var result = ''; | |
| do result = this._rixits.charAt(n%64) + result; | |
| while( n=Math.floor(n/64) ); | |
| return result; // String |
| """ | |
| Simple python dice module. | |
| By sixthgear <[email protected]> | |
| """ | |
| import random | |
| import fractions | |
| import itertools | |
| class Dice(object): |
| #!/usr/bin/env python3 | |
| # encoding: utf-8 | |
| # By Joonas Kuorilehto 2011, MIT license | |
| # | |
| # The script combines .ssh/known_hosts so that each fingerprint is only | |
| # listed once. | |
| import re | |
| import sys | |
| import os |
| /* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon | |
| * http://j.mearie.org/post/1181041789/brainfuck-interpreter-in-2-lines-of-c */ | |
| s[99],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c&2,b=c%7?a&&(c&17 | |
| ?c&1?(*r+=b-1):(r+=b-1):syscall(4-!b,b,r,1),0):v;b&&c|a**r;v=d)main(!c,&a);d=v;} |