Skip to content

Instantly share code, notes, and snippets.

View mxmilkiib's full-sized avatar
🔊

Milkii Brewster mxmilkiib

🔊
View GitHub Profile
@rcmachado
rcmachado / html5.vim
Created December 15, 2009 10:35
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@sirupsen
sirupsen / shoot.sh
Created April 20, 2010 21:31
Simple Linux screenshot utility for Imgur.
#!/bin/bash
#
# By Sirupsen @ http://sirupsen.dk
#
# Description: Very simple script to make you
# select a region of your screen, which will be captured, and
# then uploaded. The URL will then be inserted into your clipboard.
#
# Dependencies:
#
@afiore
afiore / pagesnap
Created June 21, 2010 02:06
Save a webpage (and its linked assets) into a single HTML file.
#! /usr/bin/env php
<?php
/***
* PageSnap
*
* Script for archiving a HTML page (and associated media assets) into a single file.
*
* Requires:
*
@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

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@defunkt
defunkt / zombies.md
Created December 29, 2010 22:57
—All You Zombies— by Robert A. Heinlein

All You Zombies

2217 Time Zone V (EST) 7 Nov. 1970--NTC-- "Pop's Place": I was polishing a brandy snifter when the Unmarried Mother came in. I noted the time---10:17 P. M. zone five, or eastern time, November 7th, 1970. Temporal agents always notice time and date; we must.

The Unmarried Mother was a man twenty--five years old, no taller than I am, childish features and a touchy temper. I didn't like his looks---I never had---but he was a lad I was here to recruit, he was my boy. I gave him my best barkeep's smile.

Maybe I'm too critical. He wasn't swish; his nickname came from what he always said when some nosy type asked him his line: "I'm an unmarried mother." If he felt less than murderous he would add: "at four cents a word. I write confession stories."

If he felt nasty, he would wait for somebody to make something of it. He had a lethal style of infighting, like a female cop---reason I wanted him. Not the only one.

# kcbanner's zshrc file v0.1, based on:
# jdong's zshrc file v0.2.1 and
# mako's zshrc file, v0.1
setopt ALL_EXPORT
# Set/unset shell options
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs nohup incappendhistory sharehistory extendedhistory
setopt autoresume histignoredups pushdsilent menucomplete
@msimpson
msimpson / pipes
Created July 21, 2011 10:40
2D Bash version of the Pipes screensaver.
#!/bin/bash
declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0
declare -ir w=$(tput cols) h=$(tput lines)
declare -i x=$((w/2)) y=$((h/2))
declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93"
[10]="\x9b" [11]="\x81" [12]="\x93"
[21]="\x97" [22]="\x83" [23]="\x9b"
[30]="\x97" [32]="\x8f" [33]="\x81" )
OPTIND=1
# -*-coding: utf-8-*-
module Enumerable def ‰&b;each &b;end end
∲,☃,☣,☺,✄,❤,⚠,❣=10,{},->*♧{☃[♧]=1},->*♒{☃[♒]},->*✍{☒=❤[*✍]
☺[*✍]?☒&2>☒&12:☒==3},->⚓,♫{✉=0;⚠[->¢,♎{¢|♎==0||☺[¢+⚓,♎+♫]&&✉+=1}];✉},
->➨{(-1..1).‰{|¢|(-1..1).‰{|♎|➨[¢,♎]}}},->{∲.downto(-∲).‰{|☒|(-∲..∲).‰{|☐|
$><<(☺[☐,☒]??X:?.)};puts}};☀=->{☃=({}.tap{|త|☃.‰{|(☐,☒),_|⚠[->¢,♎{
¢|♎==0||త[[☐+¢,☒+♎]]=✄[☐+¢,☒+♎]}]}})};☣[0,0];☣[1,0];☣[2,0];☣[2,1];☣[1,2]
loop{❣[];☀[]}
@thefuxia
thefuxia / defer-cf7-scripts.php
Last active March 21, 2021 20:59
Plugin: Defer Contact Form 7 Scripts
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Defer Contact Form 7 Scripts
* Description: Adds <code>defer='defer'</code> to enqueued javascripts.
* Version: 1.0
* Required: 3.3
* Author: Fuxia Scholz
* Author URI: https://fuxia.me
* License: GPL
* License URI: http://www.gnu.org/copyleft/gpl.html