(Cmd+Shift+P, Package Control: Install Package)
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
| # Imports | |
| import subprocess | |
| # Function definition | |
| def say(thing): | |
| subprocess.call('say %s' % thing, shell=True) | |
| # Keyboard shortcuts | |
| # Cmd+S save | |
| # Cmd+C copy |
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
| >>> from speech import say | |
| >>> words = [] | |
| >>> words | |
| [] | |
| >>> words.append("hello") | |
| >>> words | |
| ['hello'] | |
| >>> words.append("elisheva") | |
| >>> say(words) | |
| >>> words.reverse() |
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
| Python 2.7.8 (default, Apr 8 2015, 14:55:10) | |
| [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> ["one","two","three"] | |
| ['one', 'two', 'three'] | |
| >>> ["one","two","three"][:2] | |
| ['one', 'two'] | |
| >>> ["one","two","three"][:-1] | |
| ['one', 'two'] | |
| >>> ["one","two","three"][-1] |
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
| $ python | |
| Python 2.7.8 (default, Apr 8 2015, 14:55:10) | |
| [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from speech import say | |
| >>> say('this is a test') | |
| >>> say('this is a test') | |
| >>> say('Hello Ellisheva!') | |
| >>> say('hello daddy') | |
| >>> "na"*3 |
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
| import requests | |
| import sys | |
| import time | |
| import subprocess | |
| if len(sys.argv) != 2: | |
| print 'Usage: new_host_DNS.py [url]' | |
| sys.exit(0) | |
| NX = True |
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
| import cmd | |
| import os | |
| import subprocess | |
| import shlex | |
| from pipes import quote | |
| devnull = open(os.devnull, 'w') | |
| class Voice(cmd.Cmd): | |
| """Simple command processor example.""" |
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:$.post('http://server.thinkjson.com/echo.php?url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title)); |
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
| var http = require('http'); | |
| var options = { | |
| host: 'logs.loggly.com', | |
| port: 80, | |
| path: '/inputs/{input_id}', | |
| method: 'POST' | |
| }; | |
| exports.write = function(data) { | |
| var req = http.request(options, function(res) {}); | |
| req.on('error', function(e) { |
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:$('.tweet-text').each(function(i, item) { $(this).html($(this).html().replace(/(\w+) \d+\:\d+/g, '<a href="https://www.bible.com/search?q=$&">$&</a>')); }); |