This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.noConflict(); | |
jQuery(document).ready(function($){ | |
$('.audio').each(function(){ | |
var match = $(this).find('script').html().match(/audio_file=(.*)\\x26/); | |
$(this).find('span').html('<audio src="'+match[1]+'?plead=please-dont-download-this-or-our-lawyers-wont-let-us-host-audio" controls="controls">Your browser does not support the audio element.</audio>').remove(); | |
$(this).find('script').remove(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage { "pre": before => Stage["main"] } | |
class pre { | |
package { | |
"build-essential": ensure => latest; | |
"ruby": ensure => "4.5"; # Ruby 1.8.7 | |
"ruby-dev": ensure => "4.5"; # Ruby 1.8.7 | |
"rubygems": ensure => "1.3.7-2"; | |
} | |
} | |
class { "pre": stage => "pre" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.messages.storage.base import Message, BaseStorage | |
class JSONSessionStorage(BaseStorage): | |
""" | |
Stores messages in JSON-compatible format | |
""" | |
session_key = '_messages' | |
def _to_dict(self, message): | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#some_style | |
@media (max-width: 320px) & | |
display: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Senator Schumer, | |
I am one of your constituents, and I'm writing you to express my extreme | |
disapproval of the COICA bill you recently voted for in the Senate Judiciary | |
committee. | |
This bill is harmful (and even offensive). It frightens me both as a citizen | |
and a web developer. | |
As a human being, it irks me to see the US attempting to regulate access to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracted from django-oembed, because I keep having a need for this snippet | |
import re | |
from heapq import heappush, heappop | |
def re_parts(regex_list, text): | |
""" | |
An iterator that returns the entire text, but split by which regex it | |
matched, or none at all. If it did, the first value of the returned tuple | |
is the index into the regex list, otherwise -1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Crash IE6 + IE7</title> | |
<!--[if IE 6]> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "flag/*.png"; | |
@import "emblem/*.png"; | |
.flag-sprite { | |
width: image-width("flag/us.png"); | |
height: image-height("flag/us.png"); | |
padding: 0; | |
} | |
.emblem-sprite { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @include rounded(25px) | |
@mixin rounded($radius) | |
-webkit-border-radius: $radius | |
-moz-border-radius: $radius | |
border-radius: $radius | |
@mixin rounded-tl($radius) | |
-moz-border-radius-topleft: $radius | |
-webkit-border-top-left-radius: $radius | |
border-top-left-radius: $radius |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Quick hack to help you find and deal with old watched repos, forks and owned repos. | |
# | |
# It will ask you to confirm once if you want to unwatch a repo. | |
# | |
# You can't unwatch your own repos, so they will need to be deleted. | |
# THIS SCRIPT WILL ASK YOU FOR CONFIRMATION TWICE BEFORE IT DELETES A REPO. | |
# | |
require 'rubygems' |