Skip to content

Instantly share code, notes, and snippets.

View bluestrike2's full-sized avatar

Tom Stoecklein bluestrike2

View GitHub Profile
@bluestrike2
bluestrike2 / android_instructions.md
Created August 3, 2016 19:10 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

# This code is free software; you can redistribute it and/or modify it under
# the terms of the new BSD License.
#
# Copyright (c) 2010, Sebastian Staudt
# A nano configuration file to enable syntax highlighting of some Git specific
# files with the GNU nano text editor (http://www.nano-editor.org)
#
# Save this file to a directory of your choice and add it to your nanorc using
# include ${PATH_TO_THE_FILE}/git.nanorc
#app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
def opensearch
response.headers['Content-Type'] = 'application/opensearchdescription+xml; charset=utf-8'
end
@bluestrike2
bluestrike2 / 0-readme.md
Created December 10, 2012 18:09 — forked from burke/0-readme.md
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@bluestrike2
bluestrike2 / es.sh
Created July 17, 2012 00:07 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@bluestrike2
bluestrike2 / php.rb
Created April 3, 2012 06:07
php homebrew formula for running php apps through RACK e.g. pow
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php <Formula
url 'http://www.php.net/get/php-5.4.0.tar.gz/from/this/mirror'
homepage 'http://php.net/'
md5 'f4ce40d5d156ca66a996dbb8a0e7666a'
@bluestrike2
bluestrike2 / jquery.autogrow.js
Created April 2, 2012 11:19 — forked from jlong/jquery.autogrow.js
Autogrow Textareas in jQuery
/*
* jquery.autogrow.js
*
* A plugin written for UserVoice that makes it easy to create textareas
* that automatically resize to fit their contents.
*
* Based on Scott Moonen's original code for Prototype.js:
*
* <http://scottmoonen.com/2008/07/08/unobtrusive-javascript-expandable-textareas/>
*
@bluestrike2
bluestrike2 / gist:1623318
Created January 16, 2012 22:11 — forked from raws/gist:1233539
Authenticate against ExpressionEngine >= 2.2.2 member data in Ruby
#!/usr/bin/env RBENV_VERSION=1.9.3-preview1 ruby
require "digest"
require "sequel"
module ExpressionEngine
module Authentication
ALGORITHMS = {
32 => Digest::MD5,
40 => Digest::SHA1,