Skip to content

Instantly share code, notes, and snippets.

@passcod
passcod / markup.html
Created April 30, 2011 04:35
Another way to hide emails from robots
<span id="email">@</span>
@passcod
passcod / .excess
Last active September 27, 2015 07:38
Excess
# Excess (v.FINAL)
# Félix Saparelli 2011-13
# Public Domain (CC0)
xs() { echo "Excess is dead. See https://github.com/passcod/bin"; }
xs-update() { xs; }
@passcod
passcod / Gemfile
Created October 13, 2011 00:29
CoffeeScript on Heroku (cedar)
# ...
group :production do
gem "therubyracer"
end
gem "execjs"
gem "coffee-script"
# ...
@passcod
passcod / data-markdown.user.js
Created November 9, 2011 00:56 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name *[data-markdown]
// @version 2.0
// @description Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/> and others
// @include *
// ==/UserScript==
// Contribs:
// Thaddee Tyl <http://espadrine.github.com/>
@passcod
passcod / gist:1878817
Created February 21, 2012 20:46
SCSS font-feature Mixin
@mixin font-features($features: (liga, rlig)) {
$feature_string: "";
$moz_feature_string: "";
@each $feature in $features {
$feature_string: $feature_string + " \"" + $feature + "\" 1";
$moz_feature_string: $moz_feature_string + " \"" + $feature + "=1\"";
@if nth($features, length($features)) != $feature {
$feature_string: $feature_string + ",";
@passcod
passcod / .rvmrc
Created March 22, 2012 15:00
Use either 1.9.3 or 1.9.2 with RVM
#!/usr/bin/env bash
ruby_string="ruby-1.9.3"
ruby_alt_string="ruby-1.9.2"
gemset_name="tavignano"
if (( `rvm list strings | grep -c "${ruby_string}"` ))
then
# Load or create the specified environment
rvm --create use "${ruby_string}@${gemset_name}"
@passcod
passcod / _arrow_bx.scss
Created April 12, 2012 06:58
SCSS Arrow Please!
/* Coded by @passcod, MIT Licensed: passcod.mit-license.org
Adapted from @shojberg's cssarrowplease.com
*/
@mixin arrow-box( $selector: ".arrow-box",
$position: "top",
$arrow_size: 10px,
$border_width: 2px,
$box_color: #333,
$border_color: #ccc) {
@passcod
passcod / parseUri.coffee
Created April 24, 2012 19:13 — forked from mrclay/UFCOE.parseUri.js
Parse a URI using the DOM
parseUri = (uri) ->
result = {}
a = document.createElement 'a'
props = 'protocol hostname host pathname port search hash href'.split ' '
a.href = uri
# Copy relevant properties
result[prop] = a[prop] for prop in props
@passcod
passcod / dom-loaded-test.html
Created May 26, 2012 08:29
onload, readyState, and DOMContentLoaded
<!DOCTYPE html>
<html>
<head>
<script>
window.onload = function () {
console.log(''+(+new Date)+': Onload fired');
};
document.onreadystatechange = function () {
console.log(''+(+new Date)+': Ready state changed');
@passcod
passcod / file.xml
Created June 18, 2012 02:11
OS X U.S. Keyboard Layout with "PC-like" Shift key
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2 on 2012-06-18 at 12:06 (NZST)-->
<!--Last edited by Ukelele version 2.2 on 2012-06-18 at 12:08 (NZST)-->
<keyboard group="0" id="1069" name="U.S. with Shift" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>