Skip to content

Instantly share code, notes, and snippets.

View xentek's full-sized avatar
🌩️
Conjuring Clouds

Eric Marden xentek

🌩️
Conjuring Clouds
View GitHub Profile
@xentek
xentek / .tmux.conf
Created July 5, 2010 21:54
custom .tmux.conf file for your multiplexing pleasure
# Custom tmux configuration: ~/.tmux.conf
# Cobbled together from google and trial & error by Eric Marden (xentek.net)
# set the command prefix to match gnuscreen (i.e. CTRL+a)
set -g prefix C-a
bind-key C-a last-window
# utf8
set-window-option -g utf8 on
@blaix
blaix / snow_leopard_terminal_colors.markdown
Created July 23, 2010 14:30
Pretty Terminal colors in OS X 10.6 Snow Leopard

For pretty, readable, light-on-dark colors in Terminal.app:

After reading a handful of blog posts I finally got this working in 10.6...

  1. Add this to ~/.bash_profile:

     export CLICOLOR=1
    
  2. Install SIMBL.

# If updates have been made, the Sunspot::Rails plugin will issue a commit at the end of a request
# using an after_filter. It checks two config variables first, which you can use to disable
# the automatic commits if you want a different commit policy.
Sunspot::Rails.configuration.auto_commit_after_request = false
Sunspot::Rails.configuration.auto_commit_after_delete_request = false
@zerowidth
zerowidth / paginated_collection.js
Created November 18, 2010 22:04
first whack at pagination with backbone.js
// includes bindings for fetching/fetched
PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
this.page = 1;
},
fetch: function(options) {
options || (options = {});
this.trigger("fetching");
@xentek
xentek / XENTEK.tmTheme
Created December 31, 2010 19:29
Custom TextMate theme based on Hunch-Dark-dimmed.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>XENTEK</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@io41
io41 / paginated_collection.js
Created February 22, 2011 10:10 — forked from zerowidth/paginated_collection.js
Pagination with Backbone.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
anonymous
anonymous / no-cache-example.rb
Created August 4, 2011 21:39
def set_no_cache
headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
headers["Pragma"] = "no-cache"
headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end
@ubermajestix
ubermajestix / Rakefile
Created September 22, 2011 19:00
Rake tasks for managing your spork server. Check the Rakefile to bypass loading Rails to run these rake tasks super fast.
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
# If certain tasks are called, don't load Rails!
if %w(spork:start spork:restart spork:stop).include?(Rake.application.top_level_tasks.first)
# Load the rake tasks
Dir.glob("#{File.expand_path("../lib/tasks", __FILE__)}/*.rake").each { |r| import r }
else
require File.expand_path('../config/application', __FILE__)
@jnx
jnx / rbenv-install-system-wide.sh
Created October 1, 2011 20:09
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@xentek
xentek / generate_update.sh
Created November 19, 2011 21:34
Generate the necessary sql statements to move a WordPress site from one environment to another
#!/usr/bin/env bash
echo "@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@@ @@@ @@@@@@@@ @@@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@! !@@ @@! @@!@!@@@ @@! @@! @@! !@@ "
echo "!@! @!! !@! !@!!@!@! !@! !@! !@! @!! "
echo " !@@!@! @!!!:! @!@ !!@! @!! @!!!:! @!@@!@! "
echo " @!!! !!!!!: !@! !!! !!! !!!!!: !!@!!! "
echo " !: :!! !!: !!: !!! !!: !!: !!: :!! "
echo ":!: !:! :!: :!: !:! :!: :!: :!: !:! "