| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| application: filehangar | |
| version: live | |
| runtime: python | |
| api_version: 1 | |
| handlers: | |
| - url: /remote_api | |
| script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py | |
| login: admin |
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
| #!/usr/bin/env python | |
| """ | |
| Credit System for Python Code | |
| This program analyzes Python code with pylint | |
| and calculates a credit for the code, depending | |
| on a miimum required score and the previous run. | |
| """ | |
| import sys |
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
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| bejeweled.py - simple bot to play Bejeweled 3 on a Mac for you | |
| Created by Maximillian Dornseif on 2011-08-09. | |
| """ | |
| import sys | |
| import os |
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
| 'use strict'; | |
| var KEYS = { | |
| enter: 13, | |
| left: 37, | |
| right: 39, | |
| escape: 27, | |
| backspace: 8, | |
| comma: 188, | |
| shift: 16, |
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
| // As a Function method.. | |
| (function(){ | |
| Function.prototype.docString = function(){ | |
| var doc = this[this.toSource ? 'toSource' : 'toString']().match(/['"]\*(.*)\*['"]/); | |
| return (doc) ? doc[1].replace(/^\s+|\s+$/g, '') : ''; | |
| }; | |
| })(); |
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
| (* Script to record and tag spotify tracks, by Lloyd Moore *) | |
| (* Modified by Tiffany G. Wilson to resolve audio splitting issues, automate starting/stopping, and add recording customization *) | |
| (* Modified by github.com/duggi on 7/18/2014 -- replace slash with dashin new filename to prevent directory write errors *) | |
| (* Snippets for controlling Spotify are from Johnny B on tumblr (http://johnnyb.tumblr.com/post/25716608379/spotify-offline-playlist) *) | |
| (* The idea of using delayed tagging/filename updating is from a guest user on pastebin (http://pastebin.com/rHqY0qg9) *) | |
| (* The only thing to change in the script is the output format; you must change the file extension and the recording format to match *) | |
| (* Run this script once a song you want to record is queued (stopped at beginning) or playing *) | |
| (* Running the script will initiate hijacking, recording and audio playback *) | |
| (* To stop script, pause Spotify or wait for album/playlist to end*) | |
| (* To set id3 tags, use application Kid3 (http://sourceforge.net/pr |
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
| on safari_is_ready(docNum, interval) | |
| repeat | |
| tell application "Safari" | |
| try | |
| do JavaScript "document.readyState" in document docNum | |
| set readyState to result | |
| set finishedLoading to (source of document docNum contains "</html>") | |
| if finishedLoading and readyState is "Complete" then exit repeat | |
| end try | |
| end tell |
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(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); |
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
| """ | |
| Here's how to run a command from Python piping a string in to stdin and reading the | |
| output back in to another string. It took me way too long to work this out. | |
| """ | |
| from subprocess import Popen, PIPE | |
| output = Popen( | |
| ['java', '-jar', 'yuicompressor-2.4.2.jar', '--type=css'], | |
| stdin=PIPE, stdout=PIPE |
OlderNewer