start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env python | |
import os | |
import optparse | |
def processfile(fi, fo) : | |
print 'lame --decode --quiet %s %s' % (fi,fo) | |
if __name__ == '__main__': | |
# parse options | |
parser = optparse.OptionParser() |
Found here: http://macosx-tex.576846.n2.nabble.com/BasicTeX-and-documentation-td7579224.html | |
Problem: BasicTex does not come with texdoc installed, and does not build docs by default | |
1. Install texdoc | |
> tlmgr install texdoc | |
2. Enable automatic build of documentation, which is disabled (default) for BasicTeX tlmgr. | |
> tlmgr option docfiles 1 |
Debug a Preference Pane with Xcode 4 | |
Jun 13, 2011 | |
Some time ago I did a post to show how to debug a Preference Pane with Xcode, but the tip was for Xcode 3, and now with Xcode 4 it has changed a bit. | |
But yesterday Scott Lahteine posted a comment to explain how to do it, so here is the new method for Xcode 4. | |
• In the product menu choose Edit Scheme... | |
• Go to the Run section and in the Executable field choose System Preferences.app |
/** | |
* Sends an email using the contents of a Google Document as the body. | |
*/ | |
function sendDocument(documentId, recipient, subject) { | |
var html = convertToHtml(documentId); | |
html = inlineCss(html); | |
GmailApp.sendEmail(recipient, subject, null, { | |
htmlBody: html | |
}); | |
} |
下面是一堆awesome-*列表轮子,想看干货的童靴可以随意打开一个轮子:
This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.
To use the script, follow the instructions given in the script's docstring.
For further details, read this blogpost.
The procedure outlined here is inspired by this answer on Stack Overflow.
function createEventWithAttachment() { | |
var driveFileId = '...'; | |
var file = DriveApp.getFileById(driveFileId); | |
var event = { | |
summary: 'Test Event with Attachments', | |
description: 'Woot!', | |
attachments: [{ | |
fileId: driveFileId, | |
fileUrl: file.getUrl(), | |
mimeType: file.getMimeType(), |