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
import sys | |
from ctypes import * | |
from datetime import datetime | |
import subprocess as subp | |
STD_OUTPUT_HANDLE_ID = c_ulong(0xfffffff5) | |
windll.Kernel32.GetStdHandle.restype = c_ulong | |
std_output_hdl = windll.Kernel32.GetStdHandle(STD_OUTPUT_HANDLE_ID) |
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
import nmap | |
import sys | |
from time import sleep | |
HOSTS= "192.168.1.1-255" | |
class ansicolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' |
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
import xmltodict | |
import urllib2 | |
PLANETS = ["mercury", "venus", "earth", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"] | |
WA_KEY = "GETYOUR-OWNAPIKEY" | |
def query(q, key=WA_KEY): | |
return urllib2.urlopen('http://api.wolframalpha.com/v2/query?appid=%s&input=%s&format=plaintext' % (key,urllib2.quote(q))).read() |
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
# install the building dependencies | |
sudo aptitude install libevent-pthreads-2.0-5 libao-dev libgnutls-dev libmad0-dev libfaad-dev libjson0-dev libjson-glib-dev libavformat-dev libavfilter-dev | |
rm -rf ~/repos/pianobar | |
git clone git://github.com/PromyLOPh/pianobar.git ~/repos/pianobar | |
cd ~/repos/pianobar | |
make | |
# all set, you can run pianobar directly from the source directory, alternatively run this command to have it installed: | |
[sudo make install] |
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 | |
# To add an an entry from a remote machine (NAME at LOCATION): | |
# $ echo "LOCATION::NAME" | telnet YOURSERVER 45667 | |
import socket | |
from datetime import datetime | |
HOST = "" |
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 | |
## | |
# Example usage: swapwin firefox 1280 | |
# | |
# Be sure to install wmctrl. | |
## | |
name=$1 | |
location=$2 |
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
git clone --bare https://github.com/kalebo/dotfiles.git $HOME/.dotfiles | |
function gitdot { | |
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@ | |
} | |
mkdir -p .dotfiles-backup | |
gitdot checkout | |
if [ $? = 0 ]; then | |
echo "Checked out config."; | |
else | |
echo "Backing up pre-existing dot files."; |
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
''' | |
' This is a remixed VB script that I adapted from BillP3rd from stackoverflow. | |
' It expects a existing directory for output and powerpoint to be installed. | |
' | |
' Usage: cscript ppxt2pdf.vbs c:\Users\user\class_ppt_dir class_handouts_dir | |
' | |
' Also, I hate Visual Basic | |
''' | |
Option Explicit |
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
get-adgroupmember adgroupname | foreach {get-aduser $_.name | select name, surname, givenname} | sort-object surname | Format-Table -autosize |
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
[ | |
"What do now guys?", | |
"Did I tell you about that time I got stuck in an elevator?", | |
"Life's hard when 'tarded.", | |
"So... Lunch?", | |
"Mornin. (said around 1pm)", | |
"Ooo, piece of candy!", | |
"It's brrzy outside.", | |
"It'll be super cute!" | |
] |
OlderNewer