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
int buf = 0; | |
int xcoordinate = 0; | |
int ycoordinate = 0; | |
void setup() | |
{ | |
// start serial port at 9600 bps and wait for port to open: | |
Serial.begin(115200); | |
} |
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
#include <Servo.h> | |
Servo servo1; | |
Servo servo2; | |
float theta1; | |
float theta2; | |
int pot1 = 0; | |
int pot2 = 1; | |
void setup() { |
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
void explode(String message) | |
{ | |
int count = 0; | |
do | |
{ | |
commaPosition = message.indexOf(':'); | |
if(commaPosition != -1) | |
{ | |
Serial.println( message.substring(0,commaPosition)); | |
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
dispatch_queue_t queue = dispatch_get_global_queue( | |
DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
dispatch_async(queue, ^{ | |
//any thing | |
}); | |
//ref |
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 socket | |
import struct | |
def wake_on_lan(macaddress): | |
""" Switches on remote computers using WOL. """ | |
# Check macaddress format and try to compensate. | |
if len(macaddress) == 12: | |
pass |
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 express = require('express') | |
, app = express() | |
, server = require('http').createServer(app) | |
, path = require('path') | |
, io = require('socket.io').listen(server) | |
, spawn = require('child_process').spawn | |
// all environments |
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 GF2 import one | |
def GF2_addLists(L1,L2): return [vx+ux for (vx,ux) in zip(L1,L2)] | |
def solve(u): | |
#data | |
data = { | |
'a':[one,one,one,0,0,0,0] | |
, 'b':[0,one,one,one,0,0,0] |
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 pxssh | |
def send_command(s, cmd): | |
s.sendline(cmd) | |
s.prompt() | |
print s.before | |
def connect(user, host, password): | |
try: | |
s = pxssh.pxssh() |
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 nmap | |
import optparse | |
def nmapScan(tgtHost, tgtPort): | |
nmScan = nmap.PortScanner() | |
nmScan.scan(tgtHost, tgtPort) | |
state = nmScan[tgtHost]['tcp'][int(tgtPort)]['state'] | |
print " [*] " + tgtHost + " tcp/" + tgtPort + " " + state | |
def main(): |
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 zipfile | |
import optparse | |
from threading import Thread | |
def extractFile(zFile, password): | |
try: | |
zFile.extractall(pwd = password) | |
print '[+] Found password ' + password + '\n' | |
except: | |
pass |