NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
| # Open Terminal | |
| vim ~/.vimrc | |
| # Mac OS-X -> .vimrc ; Window -> .gvimrc | |
| # Add it in the file and adjust the font size (h12) accordingly | |
| set guifont=Menlo\ Regular:h15 |
| [program:caddy] | |
| command=/usr/bin/caddy -conf="/etc/caddy/Caddyfile" | |
| autostart=true | |
| autorestart=true | |
| startsecs=10 | |
| stdout_logfile=/var/log/caddy.log | |
| stdout_logfile_maxbytes=1MB | |
| stdout_logfile_backups=10 | |
| stdout_capture_maxbytes=1MB | |
| stderr_logfile=/var/log/caddy_error.log |
| contract random { | |
| /* Generates a random number from 0 to 100 based on the last block hash */ | |
| function randomGen(uint seed) constant returns (uint randomNumber) { | |
| return(uint(sha3(block.blockhash(block.number-1), seed ))%100); | |
| } | |
| /* generates a number from 0 to 2^n based on the last n blocks */ | |
| function multiBlockRandomGen(uint seed, uint size) constant returns (uint randomNumber) { | |
| uint n = 0; | |
| for (uint i = 0; i < size; i++){ |
| // Parsing arbitrary JSON using interfaces in Go | |
| // Demonstrates how to parse JSON with abritrary key names | |
| // See https://blog.golang.org/json-and-go for more info on generic JSON parsing | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) |
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "encoding/json" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |
| #include <string.h> | |
| #include <sys/time.h> | |
| #include <iostream> | |
| #include <openssl/sha.h> | |
| #include <openssl/rand.h> | |
| #include "secp256k1/src/hash_impl.h" | |
| #include "cryptopp/sha.h" | |
| static const size_t NUM_RUNS = 300000UL; |
| ## bitwalletrecover.py - recover private keys from your darkcoin wallet | |
| ## (this version was not tested with bitcoin/litecoin). | |
| ## Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), | |
| ## and base58 (https://pypi.python.org/pypi/base58). | |
| ## | |
| ## Starting with Python 3.4, pip is included by default with the Python binary | |
| ## installers. To install pip for older versions 3.x: | |
| ## | |
| ## sudo apt-get install python3-setuptools | |
| ## sudo easy_install3 pip |
| # Automatically instal the latest nginx | |
| wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
| #Make a backup copy of your current sources.list file | |
| sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
| #Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
| echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
| echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |