Normal Text
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 | |
"""Parses and encodes the result of `docker ps` in JSON format.""" | |
import json | |
import sys | |
from collections import namedtuple | |
from subprocess import Popen, PIPE | |
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
on run {input, parameters} | |
tell application "Finder" | |
set sel to selection | |
if (count sel) > 0 then | |
set myTarget to item 1 of sel | |
else if (count window) > 0 then | |
set myTarget to target of window 1 | |
else | |
set myTarget to path to home folder | |
end if |
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 python | |
from collections import OrderedDict | |
import json | |
write_data = OrderedDict([ | |
('a', '1'), | |
('b', '2'), | |
('c', '3') | |
]) |
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
<a href="http://lemonly.com/work/celebrating-towel-day-may-25-2012" title="Don't Panic, Use a Towel Day Infographic"> | |
<img src="http://lemonly.com/wp-content/uploads/2012/05/Towel-day-Infographic2.jpg"style="max-width: 100%" alt="Don't Panic Use A Towel Day Infographic Design by Lemonly" /> | |
</a> | |
Learn more about <a href="http://lemonly.com/work/celebrating-towel-day-may-25-2012">Towel Day </a> and <a href="http://lemonly.com">Infographic Design</a> from Lemonly. |
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
<a href="http://lemonly.com/work/42-towel-day-infographic" title="42: Life, The Universe, & Everything – A Towel Day Infographic by Lemonly"> | |
<img src="http://lemonly.com/wp-content/uploads/2013/05/Towel_Day-42-Infographic-960x2178.jpg"style="max-width: 100%" alt="42: Life, The Universe, & Everything – A Towel Day Infographic Design by Lemonly" /> | |
</a> | |
Learn more about <a href="http://lemonly.com/work/42-towel-day-infographic">Towel Day </a> and <a href="http://lemonly.com">Infographic Design</a> from Lemonly. |
The plan is to create a pair of executables (ngrok
and ngrokd
) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok
to connect to this ngrokd
, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com
, you'll need a record for that and for *.domain.com
.
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
# Simple demo of playing a looping sound using the (currently undocumented) sound.Player class | |
import sound | |
import os | |
from scene import * | |
class MyScene (Scene): | |
def setup(self): | |
self.player = sound.Player(os.path.expanduser('~/Pythonista.app/Beep.caf')) | |
self.player.number_of_loops = -1 #repeat forever |
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
/** | |
* When browser supports inline pdfs | |
* There is no need to append a large jquery plugin that displays them inline. | |
* | |
* You can actually use an iframe (and style it appropriately) | |
* or a link whenever inline PDF viewing is not supported | |
* | |
* This function is fairly simple and it's only for demo purposes | |
*/ | |
function appendPdf(id, url) { |