Skip to content

Instantly share code, notes, and snippets.

View malachaifrazier's full-sized avatar
🏠
Working from home

Malachai malachaifrazier

🏠
Working from home
View GitHub Profile
{
"color_scheme": "Packages/Babel/Monokai Phoenix.tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": false,
"file_exclude_patterns":
[
".DS_Store",
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
@malachaifrazier
malachaifrazier / gist:118f5954127b6c24372f
Created February 12, 2015 04:58
sublime user settings
{
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": false,
"file_exclude_patterns":
[
".DS_Store",
"Desktop.ini",
@malachaifrazier
malachaifrazier / gist:75916183ccad96761605
Created February 12, 2015 04:54
trailing spaces default settings
// Trailing Spaces' default settings.
//
// In order to tweak the settings, you should NOT edit this file, but instead
// the user-specific, empty-by-default version under "Preferences / Package
// Settings / Trailing Spaces / Settings - User".
//
// See Trailing Spaces' README for detailled instructions.
{
// By default, Trailing Spaces is "live". It means the trailing spaces
// regions will be matched in the background, and highlighted if a color
#!/bin/bash
#!/usr/local/bin/python
"""
To use this script, you must be in the root directory of a Rails project that
is using git. You should also make sure that your directory does not contain any
uncommitted changes. Then run:
$ python rails_switch_branch.py name_of_another_branch
Running the above will do the following:

Getting Balanced Payments up and running.

Files

  • balanced_controller.rb
  • _bank_account_form.html.haml
  • _credit_card_form.html.haml
  • bank_account_submission.js
  • credit_card_submission.js
# Run with: rake environment elasticsearch:reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
klass = Place
ENV['CLASS'] = klass.name
ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S')
namespace :deploy do
task :setup_solr_data_dir do
run "mkdir -p #{shared_path}/solr/data"
end
end
namespace :solr do
desc "start solr"
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec sunspot-solr start --port=8983 --data-directory=#{shared_path}/solr/data --pid-dir=#{shared_path}/pids"
group :development do
# tools
gem 'rails3-generators'
gem 'letter_opener'
gem 'database_cleaner'
gem 'yajl-ruby'
gem 'crack'
gem 'quiet_assets'
#gem 'ruby_gntp' # growl notifications