Skip to content

Instantly share code, notes, and snippets.

View virtualstaticvoid's full-sized avatar

Chris Stefano virtualstaticvoid

View GitHub Profile
@virtualstaticvoid
virtualstaticvoid / reset_mouse
Created February 29, 2012 13:46
Ubuntu 11+ - Reset mouse (if frozen)
#!/bin/bash
sudo rmmod psmouse && sudo modprobe psmouse
@virtualstaticvoid
virtualstaticvoid / remove_global_menu
Created February 29, 2012 13:44
Ubuntu 11+ Remove Global Menu
#!/bin/bash
sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
@virtualstaticvoid
virtualstaticvoid / default.tint2rc
Last active November 12, 2020 16:09
Tint2 Configuration
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 3
border_width = 0
#background_color = #000000 60
background_color = #000000 80
@virtualstaticvoid
virtualstaticvoid / Backup and download database backup
Created January 19, 2012 15:27
Automate Heroku database backups
#!/bin/bash
#
# Script to create and download a database backup on Heroku
# Written by Chris Stefano (https://github.com/virtualstaticvoid)
#
# See http://devcenter.heroku.com/articles/pgbackups for details
#
appname=$1
filename=${appname}_db_$(date +%Y%m%d)_$(date +%H%M).pg_backup
@virtualstaticvoid
virtualstaticvoid / domain.rb
Created December 30, 2011 15:55 — forked from erikrozendaal/domain.rb
Simple Ruby DSL for CQRS+ES aggregates
# CQRS+ES Domain DSL
class Symbol
def snake_case
to_s.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
gsub(/([a-z\d])([A-Z])/, '\1_\2').
tr("-", "_").
downcase.to_sym
end
@virtualstaticvoid
virtualstaticvoid / nginx.conf
Created September 5, 2011 06:32 — forked from thewebfellas/nginx.conf
sample nginx.conf for thin
user nginx;
worker_processes 5;
error_log /var/log/nginx.error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@virtualstaticvoid
virtualstaticvoid / setup.sh
Created August 23, 2011 07:52
Ubuntu install UFW (Uncomplicated Firewall)
#!/bin/bash
sudo apt-get install ufw
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow http
@virtualstaticvoid
virtualstaticvoid / gist:1164584
Created August 23, 2011 07:41
Ubuntu set correct timezone
sudo dpkg-reconfigure tzdata
@virtualstaticvoid
virtualstaticvoid / .gitconfig
Created August 16, 2011 09:44
Git commands for maintaining a master, development and feature branches
[branch "master"]
mergeoptions = --no-ff --no-commit
[branch "development"]
mergeoptions = --ff-only
@virtualstaticvoid
virtualstaticvoid / pagination.md
Created August 10, 2011 15:28 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o