Skip to content

Instantly share code, notes, and snippets.

@passcod
passcod / markup.html
Created Apr 30, 2011
Another way to hide emails from robots
View markup.html
<span id="email">@</span>
View .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 Oct 13, 2011
CoffeeScript on Heroku (cedar)
View Gemfile
# ...
group :production do
gem "therubyracer"
end
gem "execjs"
gem "coffee-script"
# ...
@passcod
passcod / data-markdown.user.js
Created Nov 9, 2011 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
View data-markdown.user.js
// ==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 Feb 21, 2012
SCSS font-feature Mixin
View gist:1878817
@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 Mar 22, 2012
Use either 1.9.3 or 1.9.2 with RVM
View .rvmrc
#!/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 Apr 12, 2012
SCSS Arrow Please!
View _arrow_bx.scss
/* 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 Apr 24, 2012 — forked from mrclay/UFCOE.parseUri.js
Parse a URI using the DOM
View parseUri.coffee
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
onload, readyState, and DOMContentLoaded
View dom-loaded-test.html
<!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 Jun 18, 2012
OS X U.S. Keyboard Layout with "PC-like" Shift key
View file.xml
<?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"/>