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 curses | |
from time import sleep | |
curses.initscr() | |
string = "this is a really fun scrolling string " | |
def scroll(stdscr): | |
try: | |
curses.curs_set(0) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/bash | |
# | |
# Masquerade/redirect incoming TCP connections on all ports (1:65535) to $dst_ip port $dst_port | |
# Call with -f to force update, even if IP cache exists and shows no changes. | |
# Make sure this isn't a CNAME! Otherwise the below dig command won't follow it and return an IP. | |
dst_host="neg9.org" | |
target_ns="google-public-dns-a.google.com" | |
dst_port=22 |
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
#!/bin/bash | |
VERBOSITY=0 | |
TEMP_D="" | |
UC_PREP="/usr/share/lxc/hooks/ubuntu-cloud-prep" | |
error() { echo "$@" 1>&2; } | |
fail() { [ $# -eq 0 ] || error "$@"; exit 1; } | |
Usage() { |
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
#!/bin/bash | |
if [ $UID != 0 ]; then echo "Please run as root"; exit 1; fi | |
SUBNET_ADDRESS='10.0.0.1' | |
SUBNET_RANGE='10.0.0.2,10.0.0.100,12h' | |
INTERNET="eno1" #upstream | |
SUBNET="enp7s0f0" #downstream | |
ifconfig "$SUBNET" "$SUBNET_ADDRESS" #set your ip for downstream | |
#ip addr add "$SUBNET_ADDRESS" dev "$SUBNET" |
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
from multiprocessing import Pool as MPool | |
from time import sleep | |
import datetime | |
import multiprocessing | |
import random | |
def time_request(): | |
from gevent import monkey; monkey.patch_socket | |
from jsonrequester import JsonRequester |
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
# request.xml | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wst="http://sensedia.com/repository/wstoolkit"> | |
<soapenv:Header> | |
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> | |
<wsse:UsernameToken wsu:Id="UsernameToken-1"> | |
<wsse:Username>system</wsse:Username> | |
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">manager</wsse:Password> | |
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">DWk64SMfJ6RxHAKgPRGtPA==</wsse:Nonce> | |
<wsu:Created>2013-04-17T18:36:54.013Z</wsu:Created> | |
</wsse:UsernameToken> |
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
#include <OSCBundle.h> | |
#include <SLIPEncodedSerial.h> | |
#include <OSCMessage.h> | |
SLIPEncodedSerial SLIPSerial(Serial); | |
// encoder stuff below vvvvv | |
#define MAXENCODERS 1 | |
volatile uint32_t encstate[MAXENCODERS]; | |
volatile uint32_t encflag[MAXENCODERS]; |
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
function Interceptor(nativeOpenWrapper, nativeSendWrapper) { | |
XMLHttpRequest.prototype.open = function () { | |
// Code here to intercept XHR | |
return nativeOpenWrapper.apply(this, arguments); | |
} | |
XMLHttpRequest.prototype.send = function () { | |
this.onloadend = function() { | |
if(this.capture) { | |
console.log(this.responseText); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer