(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
| 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:$.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
| 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
| 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
| $ 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
| 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
| >>> 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
| # Imports | |
| import subprocess | |
| # Function definition | |
| def say(thing): | |
| subprocess.call('say %s' % thing, shell=True) | |
| # Keyboard shortcuts | |
| # Cmd+S save | |
| # Cmd+C copy |
Abusive tweet storms brought on by a Twitter user with a significant amount of followers using their influence to intimidate or verbally abuse another Twitter user bears some striking similarities to a DDoS attack. If you frame the problem in terms of a DDoS attack, then many mitigation techniques used against DDoS attacks can also be used against these Twitter attacks.
By opting in, users can submit their replies for analysis by the system. Using sentiment analysis, abusive tweets can be identified programmatically, and confirmed using a mechanical turk like system. In order to broaden the scope of the analysis, the abusive user's other replies are analyzed and catalogued, being