Getting started:
Related tutorials:
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
Getting started:
Related tutorials:
| <!DOCTYPE html> | |
| <html> | |
| <head><title>Javascript RT</title></head> | |
| <style>canvas {width: 1280px; height: 768px}</style> | |
| <body> | |
| <canvas id="framebuffer"></canvas> | |
| <script type="text/javascript"> | |
| /* Fizzlefade using a Feistel network. |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| # bourne shell functions below take 1 argument, the file_to_hash. | |
| # prints hex digest on stdout | |
| md5() { | |
| perl -MDigest::MD5=md5_hex -le'print md5_hex(<> or die)' "$1" | |
| # ruby -rdigest/md5 -e"puts Digest::MD5.file'/dev/null'" | |
| # python -sBc "import hashlib;print hashlib.md5(open('$1','rb').read()).hexdigest()" | |
| # md5 "$1"|cut -d' ' -f4 # mac | |
| # md5sum "$1"|cut -d' ' -f1 # linux | |
| # openssl md5 "$1" | grep -o '[[:xdigit:]][[:xdigit:]]*$' | cat |