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
class A1(object): | |
def __init__(self): | |
print "Class A1" | |
super(A1, self).__init__() | |
class A2(A1): | |
def __init__(self): | |
print "Class A2" | |
super(A2, self).__init__() |
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 Ignore whitespace button | |
// @namespace github-ignore-whitespace | |
// @description Adds a button to github diff views to toggle the "ignore whitespace" option. | |
// @include https://github.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function main() { | |
$("#toc > .button-group").prepend('<a class="minibutton" href="?w=1">Ignore whitespace</a>'); |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
/* Don't collapse whitespace in Timecard comments */ | |
@-moz-document domain("mail.google.com"), regexp("https?://manage.dimagi.com.*timecard.*") { | |
tr > td[colspan="8"] > div > div { | |
white-space: pre-wrap; | |
} | |
} |
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 FogBugz Timesheet Hours | |
// @namespace fb-ts-hours | |
// @description Calculate and display hours worked on FogBugz timesheet popup. | |
// https://gist.github.com/millerdev/96c9b824b8902d4a5c19 | |
// @include http://manage.dimagi.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function main() { |
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 Data.List | |
main :: IO () | |
main = do | |
putStrLn "Enter a number" | |
number <- getLine | |
putStrLn $ longForm number | |
longForm n = | |
let ints = map makeInt n |
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
collatzNaive :: Int -> [Int] | |
collatzNaive 1 = [1] | |
collatzNaive n = n:sequence | |
where sequence | |
| even n = collatzNaive (n `div` 2) | |
| otherwise = collatzNaive (n*3 + 1) | |
-- Store things as a linked list of tuples - [(1, 1), (2, 2), (3, 8), (4, 3)...] | |
addKV :: (Integral a) => [(a, a)] -> a -> a -> [(a, a)] |
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
<head> | |
... | |
{% less "some/less/file.less" %} | |
{% js "some/js/file.js" %} | |
{% compress %} | |
<style type="text/less"> | |
.inline_element { | |
.child_element { | |
color: red; |
NewerOlder