This file contains hidden or 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
// javascript:(function%20(window)%20{if%20(window.location.protocol%20===%20%27https:%27)%20{window.alert(%27The%20current%20URL%20is%20already%20https:%20<%27%20+%20window.location.href%20+%20%27>%27);}%20else%20{window.location.protocol%20=%20%27https:%27;}})(window); | |
(function (window) { | |
if (window.location.protocol === 'https:') { | |
window.alert('The current URL is already https: <' + window.location.href + '>'); | |
} else { | |
window.location.protocol = 'https:'; | |
} | |
})(window); |
This file contains hidden or 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
''' | |
In response to this meme on Facebook: | |
https://www.facebook.com/msaeachubaetsmemes/photos/a.1162336560450433.1073741829.1157905574226865/1168097136541042/?type=3 | |
''' | |
from __future__ import print_function, division, unicode_literals | |
import requests | |
from bs4 import BeautifulSoup | |
url = 'http://www.sec.state.ma.us/ele/eleclk/clkidx.htm' | |
soup = BeautifulSoup(requests.get(url).text) |
This file contains hidden or 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
Moo |
This file contains hidden or 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
/** | |
* Tweaked version of Pinboard "popup with tags" bookmarklet from | |
* https://pinboard.in/howto/ | |
* | |
* - Explicitly focuses on new window to workaround window opening in the | |
* background on iPhone. | |
*/ | |
(function() { | |
var url = location.href; | |
var description; |
This file contains hidden or 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
#!/bin/sh | |
# Released as public domain by Michael Rabbitt (github.com/mrabbitt) | |
# | |
# Suppress commits with a specific substring in changed connect. | |
# | |
# Example (to suppress commits of lines with string DONTCOMMIT): | |
# | |
# git config hooks.dontcommit DONTCOMMIT | |
# |
This file contains hidden or 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 GitHubGist(Directive): | |
""" Embed GitHub Gist. | |
Usage: | |
.. gist:: GIST_ID | |
""" | |
required_arguments = 1 | |
optional_arguments = 1 |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2013 Michael Rabbitt. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to |
This file contains hidden or 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 this |
This file contains hidden or 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
(function() { | |
function addSectionNumber (elem, sectionNumber, parentSection, level) { | |
var sectionNumberStr = ''; | |
var sectionSpan; | |
if (level > 1) { | |
sectionNumberStr = parentSection + '.' + sectionNumber; | |
} else if (level > 0) { | |
sectionNumberStr = sectionNumber.toString(); | |
} |
NewerOlder