Skip to content

Instantly share code, notes, and snippets.

View xlisp's full-sized avatar
💥
On vacation

Steve Chan xlisp

💥
On vacation
View GitHub Profile
@046569
046569 / debian_wheezy_install_ngx_mruby.sh
Created April 21, 2016 15:56
1-click install ngx_mruby on debian wheezy
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"
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active July 4, 2024 05:29
Ubuntu 14.04 command line install android sdk
# 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

Use AWS CLI and jq to do some things

I'm just getting up to speed on AWS, and so I'm learning my way around the CLI. It's nice and easy to do lots of things from the CLI, like querying, creating and destroying instances and images. There are lots of fiddly bits involved in parsing output so it can be used by a script or something, though, so here are some notes.

Tools

AWS CLI

Obviously you need the AWS CLI. It's an easy install using pip. Go here to find documentation and other install methods.

@shouya
shouya / change.rb
Last active September 27, 2015 02:55
presentation @ gzruby, oct 2014
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
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active January 3, 2025 03:54
5 entertaining things you can find with the GitHub Search API
@rakhmad
rakhmad / clojure.md
Created April 17, 2012 15:55
Setting Up Clojure on OS X

Setting Up Clojure on OS X

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.

Step 1: Getting Clojure (1.3)

@shilov
shilov / redis_json_marshal_eval_benchmarks.rb
Created January 27, 2012 23:01
Ruby Redis benchmarks for JSON vs Marshal vs String
# http://forrst.com/posts/JSON_vs_Marshal_vs_eval_Which_is_the_fastest_fo-6Qy
require 'benchmark'
require 'json'
require 'redis'
# -----------------
puts "Initialize variables.."