Skip to content

Instantly share code, notes, and snippets.

get :license, :map => '/user/licenses', :provides => [:json] do
user.update(:eula => true,
:eula_date => Date.today,
:eula_ip => request.ip)
redirect '/'
end
@dphase
dphase / vimrc
Created September 12, 2014 15:29
" Remove trailing whitespace on save
" ---------------------------------------------------------------------------------
autocmd FileType c,ruby,coffee,css,slim,scss,html,xml autocmd BufWritePre <buffer> :%s/\s\+$//e
getTeacherIndex = (scope, page=1, filter='', schools='') ->
$timeout.cancel(timeoutId) if timeoutId
timeoutId = $timeout( ->
$http
.get("/api/v3/cjunction/teachers.json?scope=#{scope}&page=#{page}&filter=#{filter}&schools=#{schools}")
.then (res) ->
vm.teachers = res.data.teachers
vm.total = res.data.total
res.data
-- Modules
-- --------------------------------------------------------------------------------
local application = require "mjolnir.application"
local window = require "mjolnir.window"
local hotkey = require "mjolnir.hotkey"
local fnutils = require "mjolnir.fnutils"
local alert = require "mjolnir.alert"
local grid = require "mjolnir.sd.grid"
-- Grid Setup
# BS/NG Shit
def bs_button(label, btn_class=:default, btn_tag=:button, opts={})
end
# In view
= bs_button 'Create', :success, :ng => { disabled: '!t.is_visible', if: '!t.user_account' }
asdf
asdf
asdf
String :id, :null=>false
String :type, :text=>true
String :symbol, :text=>true
require 'dalton/strategies/skroutz'
require 'dalton/strategies/facebook'
require 'dalton/strategies/openid' # yahoo, #google
require 'dalton/strategies/twitter'
# Setup OpenId file storage, don't change the storage engine!
require 'openid/store/filesystem'
Rails.configuration.middleware.use(Rack::OpenID,
OpenID::Store::Filesystem.new(Rails.root + 'tmp/openid'))
#!/bin/bash
#
# Carbon (part of Graphite)
#
# chkconfig: 3 50 50
# description: Carbon init.d
. /etc/rc.d/init.d/functions
prog=carbon
RETVAL=0

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends