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 xmlns:og="http://ogp.me/ns#"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Links demo</title> | |
<style> | |
* { margin: 0; padding: 0; } | |
</style> | |
<script type="text/javascript" src="https://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"></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
#!/usr/bin/env python3 | |
import http.server | |
import sys | |
import time | |
stdin = sys.stdin.detach() | |
class StreamingResponseRequestHandler(http.server.BaseHTTPRequestHandler): | |
def _stream_content(self, source): | |
while True: |
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
for branch in $(git branch -a | awk '{ print $NF }' | awk '/^tags\// { print $1 }'); do | |
tag=$(echo $branch | cut -f 2- -d /); | |
# create the tag | |
git checkout $branch; | |
git tag -a -m "Tagging svn tag $tag." $tag; | |
git checkout master; | |
# delete the branch | |
git branch -rD $branch; | |
done; |
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
/* With today's realign Google seem to have taken it upon themselves to reduce the line-height of each | |
* message line… yet again. So, here's a quick-n-dirty fix :) | |
* | |
* Updated March 3 2009, since Google changed all the class names :\ | |
*/ | |
/* Message line */ | |
div.nH table tbody tr { | |
line-height: 1.6; | |
} |
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
// ==UserScript== | |
// @name Basecamp prettification | |
// @description A user stylesheet to make Basecamp a little bit prettier. Custom colors, a bit of jiggery-pokery with the header spacing, hide the milestones calendar from the dashboard page, hide the company logo (if you have one). | |
// @include https://*.basecamphq.com/* | |
// ==/UserScript== | |
var cssNode = document.createElement('link'); | |
cssNode.type = 'text/css'; | |
cssNode.rel = 'stylesheet'; | |
cssNode.href = 'http://gist.github.com/raw/236875/4316c5130f701fa7a62dd2b5e5859b9d8bb2fc55/basecamp-custom.css'; |
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
// ==UserScript== | |
// @name Blogger Content Warning Skip | |
// @description Automatically skips the content warning on blogspot.com sites without reloading the page | |
// @match http://*.blogspot.com/* | |
// ==/UserScript== | |
var fireEvent = function(obj,evt){ | |
var fireOnThis = obj; | |
if (document.createEvent) { | |
var evObj = document.createEvent('MouseEvents'); |
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.core.paginator import EmptyPage, InvalidPage, PageNotAnInteger, Page, Paginator | |
class IgnorantPage(Page): | |
"""The just-as-ignorant stepchild of IgnorantPaginator and Page.""" | |
def __init__(self, *args, **kwargs): | |
ret = super(IgnorantPage, self).__init__(*args, **kwargs) | |
# Now, we need to know if we have a first and last dealio | |
self.__has_next = (len(self.object_list) > self.paginator.per_page) | |
self.object_list = self.object_list[:self.paginator.per_page] | |
return ret |
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
Element.implement({ | |
closest: function(selector){ | |
/* Matches the nearest element with the passed selector -- much like | |
* Element.getParent, but with the starting element included */ | |
return (this.match(selector)) ? this : this.getParent(selector); | |
}, | |
addLiveEvent: function(eventType, selector, handler){ | |
/* Binds a 'live event' to all the element. Whenever the event is allowed to bubble | |
* up to this element, event.target is checked to see whether it matches the passed | |
* selector. If it does, the handler will be fired */ |
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
/* Basic color replacements */ | |
a:link, a:visited { | |
color: #039 !important; | |
} | |
a:hover { | |
color: #fff !important; | |
background-color: #039 !important; | |
} |
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
[color] | |
ui = auto | |
[user] | |
name = Oliver Beattie | |
email = oliver@obeattie.com | |
[alias] | |
stat = status | |
co = checkout | |
br = branch | |
[core] |