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
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
@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) {
@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>
@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");
# 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
@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.

@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