Skip to content

Instantly share code, notes, and snippets.

View localredhead's full-sized avatar

Levi Strope localredhead

View GitHub Profile
require "rubygems"
require "superfeedr"
## You can have all the XMPP logging by changing the Skates log level
Skates.logger.level = Log4r::DEBUG
##
# Don't ever forget that all this is ASYNCHRONOUS...
# If you don't run EM in your program, then it will started for... however, EM.run begin a blocking call, you shoudl probably run it into a specific Thread to keep the rest of your app running :)
@localredhead
localredhead / Info.plist
Created January 10, 2012 00:38
Intellij tuning options.
<key>VMOptions.x86_64</key>
<string>-Xms384m -Xmx384m -Xmn64m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=32m -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+AggressiveOpt -XX:+UseBiasedLocking -XX:+CMSClassUnloadingEnabled -XX:+DoEscapeAnalysis -Dawt.useSystemAAFontSettings=lcd</string>
______________ Stable options
<key>VMOptions.x86_64</key>
<string>-Xms400m -Xmx400m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:-UseParNewGC -XX:+AggressiveOpts -Dawt.useSystemAAFontSettings=on</string>
_______________ OR switch to GTK theme
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"

NOTE: This documentation has been put here because I couldn't find it anywhere else. I am not associated with Crunchbase in any way. I cannot help you with your Crunchbase API problems. If you need help try here: https://groups.google.com/forum/#!forum/crunchbase-api

CrunchBase API v1 Documentation

Overview

The CrunchBase API provides JSON representations of the data found on CrunchBase. The API currently supports three actions: "show", "search", and "list", which are each described below.

@localredhead
localredhead / psuedoquine.py
Created May 28, 2012 07:15
Python quine(not quite)
def counted_quine():
"""This function has been quined 0 times"""
copy=[
"def counted_quine():",
"This function has been quined 0 times",
"copy=[",
"print(copy[0])",
"for i in range(1,2):",
" print(" " + chr(34)*3 copy[i].replace(''.join(i for i in counted_quine.__doc__ if i.isdigit()), str(int(''.join(i for i in counted_quine.__doc__ if i.isdigit()))++1)) + '\"\"\"')",
"print(\" \" + copy[2])",
(defun ruby-generate-tags()
(interactive)
(let ((root (ffip-project-root)))
(let ((my-tags-file (concat root "TAGS")))
(message "Regenerating TAGS file: %s" my-tags-file)
(if (file-exists-p my-tags-file)
(delete-file my-tags-file))
(shell-command
(format "find %s -iname '*.rb' | grep -v db | xargs ctags -a -e -f %s"
root my-tags-file))
@localredhead
localredhead / rails31init.md
Created May 31, 2012 21:55 — forked from docwhat/rails31init.md
Rails 3.1 with Rspec, Factory Girl, Haml, Database Cleaner, Spork, and Guard

Install Rails 3.1

gem install rails

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@localredhead
localredhead / omniauth.rb
Created July 5, 2012 17:57 — forked from dira/omniauth.rb
OmniAuth strategy for a custom provider
# config/initializers/omniauth.rb
module OmniAuth
module Strategies
# tell OmniAuth to load our strategy
autoload :Pixelation, 'lib/pixelation_strategy'
end
end
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, "app_name", "secret"
@localredhead
localredhead / gist:3120881
Created July 16, 2012 05:42 — forked from kwdowicz/gist:1435813
Forward any requestes to port 80 to port 3000 (Mac OSX)
sudo ipfw add 1 forward 127.0.0.1,3000 ip from any to any 80 in
@localredhead
localredhead / gist:3616303
Created September 4, 2012 03:42 — forked from Irio/gist:1496746
Solution for "cannot load such file -- openssl" on RVM
When I tried run "rake test", I received:
rake aborted!
cannot load such file -- openssl
Tasks: TOP => test:units => test:prepare => db:test:prepare => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)
@localredhead
localredhead / gist:3616381
Created September 4, 2012 03:59
Uninstall all local gems (not in a gemset)
gem list | cut -d" " -f1 | xargs gem uninstall -aIx