Skip to content

Instantly share code, notes, and snippets.

View justinvt's full-sized avatar

justin thibault justinvt

View GitHub Profile
@justinvt
justinvt / 0_reuse_code.js
Created November 2, 2015 03:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# baseline REE environment settings for server environments
# http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning
## ruby defaults
# RUBY_HEAP_MIN_SLOTS=10000
# RUBY_HEAP_SLOTS_INCREMENT=10000
# RUBY_HEAP_SLOTS_GROWTH_FACTOR=1.8
# RUBY_GC_MALLOC_LIMIT=8000000
# RUBY_HEAP_FREE_MIN=4096
if ur.save
@following = @user.following
format.html
format.json { render :json => ur, :status => :ok }
else
format.html
format.json { render :json => ur.errors, :status => :unprocessable_entity }
end
gem "ajaxful_rating", :git => "[email protected]:bazaarlabs/ajaxful-rating.git"
@justinvt
justinvt / function
Created March 11, 2011 21:19
A zsh function to install textmate bundles from git repos
function get_bundle(){
bundle_dir="/Library/Application\ Support/TextMate/Bundles"
mkdir -p $bundle_dir
bundle_name=$(echo -e $1 | grep -o -P "[\w\.]+$" | sed -e 's/\.git$//g' -e 's/\.tmbundle//g')
checkout="git clone $1 $bundle_dir/$bundle_name.tmbundle"
dest=$bundle_dir/$bundle_name.tmbundle
rm -Rf $dest
git clone $1 $dest
osascript -e 'tell app "TextMate" to reload bundles'
}
includes: {
backbone: {
config: [ "sync" ],
helpers:
[ "backbone-plugin-init",
"jquery-template-loader",
"jquery-upload-data" ],
plugins: {
uploader: [
{
@justinvt
justinvt / grouper
Created February 16, 2011 21:02
Asset groups
---
backbone:
:context:
:layouts:
- content
:files:
- https://github.com/douglascrockford/JSON-js/blob/master/json2.js
- http://documentcloud.github.com/underscore/underscore.js
- http://documentcloud.github.com/backbone/backbone.js
@justinvt
justinvt / gist:823410
Created February 12, 2011 02:03
gemlist
gem install abstract
gem install actionmailer
gem install actionpack
gem install actionwebservice
gem install activemodel
gem install activerecord
gem install activeresource
gem install activesupport
gem install archive
gem install arel
puts :test
development:
port: 3312
mem_limit: 1024M
max_matches: 10000
morphology: stem_en
retry_stale: true
delta:
strategy: datetime
threshold: <%= 2.minutes.to_i %>