Skip to content

Instantly share code, notes, and snippets.

View b-mandelbrot's full-sized avatar

b-mandelbrot

View GitHub Profile
@b-mandelbrot
b-mandelbrot / geo_distance_filter_in_tire.rb
Created July 23, 2012 01:03 — forked from karmi/geo_distance_filter_in_tire.rb
Geo Distance Filter Support in Tire/ElasticSearch
require 'rubygems'
require 'tire'
Tire.index 'venues' do
delete
# 1) Create the index with proper mapping for the `location` property
create :mappings => { :venue => { :properties => { :location => { :type => 'geo_point' } } } }
# 2) Store some example documents of the `venue` type
# app/controllers/users/password_controller.rb
class Users::PasswordsController < Devise::PasswordsController
def resource_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
private :resource_params
end
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@b-mandelbrot
b-mandelbrot / puma.sh
Last active August 29, 2015 14:10 — forked from ktaragorn/puma.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: pumacontrol
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Puma web server
@b-mandelbrot
b-mandelbrot / awesome-nginx.conf
Created October 13, 2015 23:00 — forked from vjt/awesome-nginx.conf
*AWESOME* nginx configuration for Ruby/Rack web applications
#
# mmm m m mmm mmm mmm mmmmm mmm
# " # "m m m" #" # # " #" "# # # # #" #
# m"""# #m#m# #"""" """m # # # # # #""""
# "mm"# # # "#mm" "mmm" "#m#" # # # "#mm"
#
# nginx configuration For Ruby/Rack web applications
#
# Cooked up with style, care and a bit of *secret*
# nerdy spice. :-)