Skip to content

Instantly share code, notes, and snippets.

View colejhudson's full-sized avatar
🏃
roonin

Cole Hudson colejhudson

🏃
roonin
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

@martintamare
martintamare / listener.cpp
Created January 4, 2011 16:24
Ogre 3D Listener that I used to program multi-touch interactions
#include "listener.h"
//--------------------------------
// GLOBAL FOR LEVMAR
//--------------------------------
std::map<int,Vector3> mapPoint3DToMatch;
std::map<int,Vector2> mapPoint2D;
Vector3 vCentreObject = Vector3::ZERO; // Center of rotation ?
Vector3 vCentreRotation = Vector3::ZERO;
Camera * gmCamera; // Camera use to project

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
"""
Baidu is the shit. They made a super-awesome SimCity style map. To see it, go
to http://maps.baidu.com and zoom in on Beijing, then click the alternate modal
button in the top center of the maps area.
Once you're down marveling in the awesomeness you will surely be inspired to
make a giant wall-sized mural with the tiles.
Use this.
"""
@arielm
arielm / manip1App.cpp
Created June 11, 2011 17:38
Adaptation of "3D manipulation techniques for multitouch displays" to the iPad
#include "cinder/app/AppCocoaTouch.h"
#include "cinder/app/Renderer.h"
#include "cinder/Camera.h"
#include "cinder/CinderResources.h"
#include "cinder/ImageIo.h"
#include "cinder/gl/Texture.h"
#include <vector>
#include <map>
#include <list>
@Jach
Jach / number_hack.py
Created September 10, 2011 11:44
Overrides the Python integer five to be equal to four with ctypes magic
import sys
import ctypes
pyint_p = ctypes.POINTER(ctypes.c_byte*sys.getsizeof(5))
five = ctypes.cast(id(5), pyint_p)
print(2 + 2 == 5) # False
five.contents[five.contents[:].index(5)] = 4
print(2 + 2 == 5) # True (must be sufficiently large values of 2 there...)
@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@dabrahams
dabrahams / constexpr_demo.cpp
Created December 11, 2011 01:29
Fun with C++11 constexpr
#include <iostream>
#include <iomanip>
//
// Utilities
//
// RETURNS() is used to avoid writing boilerplate "->decltype(x) { return x; }" phrases.
//
// USAGE: auto function(<arguments>) RETURNS(<some-expression>);
//
@bcse
bcse / scrdec18-VC8.exe
Created February 15, 2012 10:13
Windows Script Decoder 1.8 (Decoding JScript.Encoded)
@kevinSuttle
kevinSuttle / meta-tags.md
Last active July 10, 2024 09:39 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags