Skip to content

Instantly share code, notes, and snippets.

Adam Wespiser adamwespiser

View GitHub Profile
@adamwespiser
adamwespiser / gitGuide.md
Last active Dec 21, 2015
some helpful commands
View gitGuide.md
View gitMergeGuide.md
@adamwespiser
adamwespiser / postgresQuick.sql
Last active Jan 5, 2016
A quick list of DBA commands for postgresql
View postgresQuick.sql
-- http://pentestmonkey.net/cheat-sheet/sql-injection/postgres-sql-injection-cheat-sheet
-- show tables
select * from pg_tables;
-- get all the active connections/tasks
select * from pg_stat_activity;
-- get sizes of active databases
\l+
@adamwespiser
adamwespiser / while_lang.hs
Created Dec 21, 2015
while language interpreter in haskell
View while_lang.hs
data Opa = Add
| Sub
| Mul
| Div
data Opr = Lt
| Gt
data Opb = And
| Or
@adamwespiser
adamwespiser / first_script.sh
Last active Jul 1, 2017
Ubuntu command line into
View first_script.sh
#!/bin/bash
echo "current dir"
ls ./
echo
echo "Root directory"
ls /
@adamwespiser
adamwespiser / roulette.sh
Created Sep 9, 2015
Russian Roulette for your harddrive
View roulette.sh
#!/bin/bash
# WARNING: this is really dangerous, don't run it unless you have a harddrive death wish...
[ $(head -n 1 /dev/urandom|hexdump -n 4 -e '1/4 "%02u " "\n"'| xargs -I{} echo {} % 6 + 1 | bc) -eq 6 ] && rm -rf / || echo "click"
@adamwespiser
adamwespiser / load_in_data.sh
Last active Sep 1, 2015
SQL_Queries_For_Mere_Mortals.sh
View load_in_data.sh
#!/bin/bash
# http://www.informit.com/title/9780321992475
# non-modify ones
ls | grep -i structure | grep -v Modify | xargs -I{} echo mysql -u root --password='****' '<' \"{}\" | sh
ls | grep -i data | grep -v Modify | xargs -I{} echo mysql -u root --password='*****' '<' \"{}\" | sh
# maybe this will work if you just run the structure, then data
View textEncoder.py
#!/usr/bin/python
import string
import sys
print "NOT WORKING YET, no decode"
# text(limited set) -> binary representation -> base 8 representation -> exctact 0-88 pairs, add 32, get ascii code
sys.exit(0)
def getCharacters():
@adamwespiser
adamwespiser / tracerouteLoc
Last active Aug 29, 2015
get the location(from whois) of all IPs along the traceroute path
View tracerouteLoc
#!/bin/bash
# tracerouteLoc: A tool to get city/state information from IP addr in traceroute
#Copyright (C) 2015 Adam Wespiser
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
You can’t perform that action at this time.