Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
from string import whitespace | |
atom_end = set('()"\'') | set(whitespace) | |
def parse(sexp): | |
stack, i, length = [[]], 0, len(sexp) | |
while i < length: | |
c = sexp[i] | |
print c, stack |
import re, sys | |
from xml.dom import minidom, Node | |
import math | |
import argparse | |
class Matrix: | |
def m(self, i, j, value=None): | |
if i >= self.rows or j >= self.cols: | |
raise ValueError("Argument out of range") |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.
You get a hold on such a prime beast like this:
The below configuration will pause the tour after tooltip 2 has appeared (index of 1). In the postStepCallback
we check to see if the tour has been paused and fire some code.
<script>
$(window).load(function() {
$('#joyRideTipContent').joyride({
pauseAfter : [1],
postStepCallback : function (index, tip) {
if ($(this).joyride('paused')) {
console.log('Hey there, you\'ve paused the tour.');
To toast:
- Make sure you have ImageMagick installed (
brew install imagemagick
) - Change line 7 of toast.rb to the repository name you're working with
- toast!
$ bundle install
$ ./get_token [user] [pass]
$ export GHUSER=[myuser]
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#EXTM3U | |
#EXTINF:-1,BBC - Radio 1 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p | |
#EXTINF:-1,BBC - Radio 2 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p | |
#EXTINF:-1,BBC - Radio 3 | |
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls | |
#EXTINF:-1,BBC - Radio 4 | |
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p | |
#EXTINF:-1,BBC - Radio 5 live |
# read http://peterdowns.com/posts/first-time-with-pypi.html | |
# make sure to have a ~/.pypirc configured with users and passwords | |
# go to the package folder | |
# publish package to test pypi | |
python setup.py register -r pypitest | |
python setup.py sdist upload -r pypitest | |
# publish package to live pypi | |
python setup.py register -r pypi |