This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lazy = require 'lazy' | |
| http = require 'http' | |
| http.globalAgent.maxSockets = 200 | |
| process.stdin.resume() | |
| failed = 0 | |
| success = 0 | |
| status = -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install libssl-dev libreadline-dev libyaml-dev build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libffi-dev | |
| sudo gem install fpm | |
| wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
| tar -zxvf ruby-1.9.3-p194.tar.gz | |
| ./configure --prefix=/usr && make && make install DESTDIR=/tmp/ruby193 | |
| fpm -s dir -t deb -n ruby -v 1.9.3-p194 -C /tmp/ruby193 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (fn [n] | |
| (let [primes | |
| (fn primes [] | |
| (concat | |
| [2 3 5 7] | |
| (lazy-seq | |
| (let [primes-from | |
| (fn primes-from [n] | |
| (if (some #(zero? (rem n %)) | |
| (take-while #(<= (* % %) n) (primes))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (fn [player board] | |
| (let [column | |
| (fn [[x y]] | |
| (for [newy [0 1 2]] | |
| [x newy])) | |
| row | |
| (fn [[x y]] | |
| (for [newx [0 1 2]] | |
| [newx y])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| awk '$9 == 404 {print $7}' access.log | uniq -c | sort -rn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl genrsa -des3 -out DOMAIN.key 2048 | |
| openssl req -new -key DOMAIN.key -out DOMAIN.csr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get install libreadline-dev libyaml-dev build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison | |
| ./configure --prefix=/usr && make && make install DESTDIR=/tmp/ruby193 | |
| fpm -s dir -t deb -n ruby -v 1.9.3-p125 -C /tmp/ruby193 \ | |
| -p ruby-VERSION_ARCH.deb -d "libstdc++6 (>= 4.4.3)" \ | |
| -d "libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)" \ | |
| -d "libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)" \ | |
| -d "libssl0.9.8 (>= 0.9.8)" -d "zlib1g (>= 1:1.2.2)" \ | |
| usr/bin usr/lib usr/share/man usr/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'fog' | |
| AWS = Fog::Compute.new(:provider => 'AWS') | |
| REGIONS = AWS.describe_regions.body["regionInfo"].map {|region| region["regionName"]} | |
| COMPUTE = {} | |
| REGIONS.each do |region| | |
| COMPUTE.merge!(region => Fog::Compute.new({:provider => 'AWS', :region=>region})) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| CORES="`cat /proc/cpuinfo | grep processor | wc -l`" | |
| CORES16="`echo "$CORES * 16" | bc`" | |
| STRINGRAM="`cat /proc/meminfo | head -n 1 | awk '{print $2}'` / 1024" | |
| RAM=`echo $STRINGRAM | bc` | |
| RAM64="`echo "$RAM / 64" | bc`" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [client] | |
| default-character-set = utf8 | |
| socket = /tmp/mysql.sock | |
| [mysqld] | |
| #skip-grant-tables | |
| max_sp_recursion_depth = 255 | |
| socket = /tmp/mysql.sock | |
| tmpdir = /opt/tmp |