Skip to content

Instantly share code, notes, and snippets.

View ticean's full-sized avatar

Ticean Bennett ticean

View GitHub Profile
@ticean
ticean / rails_load_path_tips.md
Last active August 29, 2015 14:26 — forked from maxim/rails_load_path_tips.md
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

#!/bin/bash
#
# This script will mount /Users in the boot2docker VM using NFS (instead of the
# default vboxsf). It's probably not a good idea to run it while there are
# Docker containers running in boot2docker.
#
# Usage: sudo ./boot2docker-use-nfs.sh
#
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
(ns ingredient.core
(:require [clojure.browser.repl]
[om.core :as om :include-macros true]
[sablono.core :as html :refer [html] :include-macros true]
[cljs.core.async :refer [put! chan close! sliding-buffer]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(enable-console-print!)
(def app-state
@ticean
ticean / ux.cljs
Created July 14, 2014 22:46 — forked from anonymous/ux.cljs
;;; TODO - drag-enter and -exit events : Right now, a component doesn't receive events for other components
;;; If a component responds to drag-over, it won't "revert" state until the drag ends.
;; NOTE - compiles with om 0.1.7. Needs updating to 0.2+
(ns omdnd.ux
(:require-macros
[cljs.core.async.macros :refer [go alt!]]
)

Multi-series line chart rendered using React and D3.

@ticean
ticean / keybase.md
Last active August 29, 2015 13:57
keybase.io

Keybase proof

I hereby claim:

  • I am ticean on github.
  • I am ticean (https://keybase.io/ticean) on keybase.
  • I have a public key whose fingerprint is 873B 7B9D 4093 F77D AFA0 2649 2FBD B246 DAD1 352A

To claim this, I am signing this object:

input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ticean
ticean / heroku.coffee
Created December 1, 2012 18:55 — forked from johnbeynon/heroku.coffee
Heroku Hubot Script
# A limited way to interact with the Heroku API.
#
# INSTALLATION:
# 1. Create file in scripts folder in hubot folder
# 2. Update package.json for hubot and add dependency on "sprintf": "0.1.1"
# 3. Set heroku config variable HEROKU_USER to heroku user account to use
# 4. Set heroku config variable HEROKU_APIKEY to heroku user account apikey (from My Account page)
#
# heroku status - Retrieve the most recent tweet from the @herokustatus account
# heroku ps --app <appname> - Get process information for application