Mou, the missing Markdown editor for web developers.
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
This worked like a charm for build 2217 on Mac OS X 10.6.8! | |
using vim: | |
1. edit file ->> "vim Sublime\ Text\ 2" | |
2. change to hex mode ->> ":$!xxd" | |
3. find and replace ->> ":%s/5BE509C33B020111/5BE509C32B020111/g" | |
or as said here using "sed 's/5BE509C33B020111/5BE509C32B020111/g' Sublime\ Text\ 2" | |
Then use the license key |
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/python | |
import subprocess | |
import time | |
cmd = 'python ./output.py' | |
proc = subprocess.Popen( | |
cmd, | |
shell=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
#/usr/bin/python | |
import datetime, calendar | |
lastFriday = datetime.date.today() | |
oneday = datetime.timedelta(days=1) | |
while lastFriday.weekday() != calendar.FRIDAY: | |
lastFriday -= oneday | |
print lastFriday.strftime("%D") |
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/python | |
# demo from here: http://pymotw.com/2/urllib2/index.html#uploading-files | |
import itertools | |
import mimetools | |
import mimetypes | |
from cStringIO import StringIO | |
import urllib | |
import urllib2 |
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 socket | |
import fcntl | |
import struct | |
def getHwAddr(ifname): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) | |
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] |
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/python | |
# demo from here: http://pymotw.com/2/urllib2/index.html#custom-protocol-handlers | |
import mimetypes | |
import os | |
import tempfile | |
import urllib | |
import urllib2 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> | |
<channel> | |
<item> | |
<g:id>demo_14</g:id> | |
<g:multipack>0</g:multipack> | |
<g:brand>Studio Design</g:brand> | |
<g:gtin></g:gtin> | |
<g:sku>demo_14</g:sku> | |
<g:item_group_id>19</g:item_group_id> |
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/python | |
import urllib | |
# python urllib module demo | |
# HTTP get response | |
response = urllib.urlopen('http://localhost:8080/') | |
print 'RESPONSE:', response | |
print 'URL :', response.geturl() |
NewerOlder