Skip to content

Instantly share code, notes, and snippets.

View adamyeats-zz's full-sized avatar

Adam Yeats adamyeats-zz

  • Ocasta Studios
  • Brighton, England
View GitHub Profile
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"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

@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

@growdigital
growdigital / smacss-sass-headings.scss
Created May 4, 2012 17:33
SMACSS Sass headings
///////////////////////////////////////////////////////////////////////////////////
//
// 88888888ba db ad88888ba 88888888888
// 88 "8b d88b d8" "8b 88
// 88 ,8P d8'`8b Y8, 88
// 88aaaaaa8P' d8' `8b `Y8aaaaa, 88aaaaa
// 88""""""8b, d8YaaaaY8b `"""""8b, 88"""""
// 88 `8b d8""""""""8b `8b 88
// 88 a8P d8' `8b Y8a a8P 88
// 88888888P" d8' `8b "Y88888P" 88888888888
@codeincontext
codeincontext / gist:3033933
Created July 2, 2012 15:56
Konami code using the Gamepad API
<!DOCTYPE html>
<html>
<head>
<title>Gamepad Shit</title>
<script type="text/javascript"></script>
<style type="text/css"></style>
</head>
<body>
<h1>Gamepad Shit</h1>
@codeincontext
codeincontext / gist:3707167
Created September 12, 2012 14:53
Facebook and Twitter login with Sinatra
require 'rubygems'
require 'sinatra'
require 'json'
require 'omniauth'
require 'omniauth-facebook'
require 'omniauth-twitter'
class SinatraApp < Sinatra::Base
configure do
set :sessions, true
@codeincontext
codeincontext / gist:4286311
Created December 14, 2012 15:36
ssh into the same directory on the server as your local working directory. If you're in /Users/skattyadz/Dropbox/code/instawall, it will ssh in and "cd instawall"
# add to ~/.bash_profile
function sshh() {
local PROJECTNAME=${PWD##*/}
local HOST=$1
eval "ssh -t ${HOST} \"cd ${PROJECTNAME}; bash\""
}
after_success:
- chmod 600 deployment/key.pem
- ssh-add deployment/key.pem
- gem install capistrano
- cap deploy