Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| apt-get update | |
| apt-get upgrade -y | |
| apt-get install -y make gcc git-core htop libreadline-dev bison tar libssl-dev zlib1g-dev bzip2 libpcre3-dev | |
| git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
| cd ~/.rbenv && src/configure && make -C src | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
| ~/.rbenv/bin/rbenv init | |
| echo 'eval "$(rbenv init -)"' >>~/.bashrc | |
| git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| export PATH="$HOME/.rbenv/bin:$PATH" |
| # install openjdk | |
| sudo apt-get install openjdk-7-jdk | |
| # download android sdk | |
| wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
| tar -xvf android-sdk_r24.2-linux.tgz | |
| cd android-sdk-linux/tools | |
| # install all sdk packages |
| class Operation < Struct.new(:name, :args, :block) | |
| class << self | |
| attr_accessor :opposite_operations | |
| end | |
| def self.define_opposite_operations(name, name_of_opposite) | |
| @opposite_operations ||= {} | |
| @opposite_operations[name] = name_of_opposite | |
| @opposite_operations[name_of_opposite] = name | |
| end |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.
I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.
This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.
| # http://forrst.com/posts/JSON_vs_Marshal_vs_eval_Which_is_the_fastest_fo-6Qy | |
| require 'benchmark' | |
| require 'json' | |
| require 'redis' | |
| # ----------------- | |
| puts "Initialize variables.." |