Skip to content

Instantly share code, notes, and snippets.

/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@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

@yuya-takeyama
yuya-takeyama / ArrayObject.php
Created June 29, 2011 16:49
Enumerable trait implementation works on PHP5.4.
<?php
namespace Rubyish;
use Rubyish\Enumerable;
class ArrayObject extends \ArrayObject
{
use Enumerable;
}
@yuya-takeyama
yuya-takeyama / README.md
Created October 22, 2011 12:10
`install* sub-command for phpenv. *NOT* for rbenv.

phpenv install

It provides install sub-command for phpenv using php-build.

Requirements

@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@xenji
xenji / compile_flags.txt
Created March 7, 2012 11:01
Compile flags for xcache and memcache for php5.4.0
CFLAGS="-D_REENTRANT -D_THREAD_SAFE -O3 -pipe -pthread" CXXFLAGS="-D_REENTRANT -D_THREAD_SAFE -O3 -pipe -pthread" ./configure
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@madrobby
madrobby / gist:3733875
Created September 16, 2012 19:09
Fade out elements on WebKit and Firefox
<style>
.fade-right {
-webkit-mask-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,1)), color-stop(0.75, rgba(0,0,0,1)), to(rgba(0,0,0,0)));
mask: url(#fade_right_svg_mask);
}
#mask_demo {
background: #d0d0d0;
height: 100px;
width: 500px;
padding: 10px;
@ziadoz
ziadoz / Version20121011141021.php
Created October 11, 2012 20:53
Doctrine DBAL and Migrations Example
<?php
/*
* /path/to/migrations/directory/Version20121011141021.php
*/
namespace ExampleMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20121011141021 extends AbstractMigration
@rtomayko
rtomayko / testlib.sh
Last active April 29, 2022 07:23
Simple shell command language test library.
#!/bin/sh
# Usage: . testlib.sh
# Simple shell command language test library.
#
# Tests must follow the basic form:
#
# begin_test "the thing"
# (
# set -e
# echo "hello"