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
_cdp_complete() | |
{ | |
local CDPATH=$(ls -d $PACKAGE_DIRECTORIES | tr -s [:space:] ':') | |
_cd | |
} | |
complete -F _cdp_complete -o nospace cdp |
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
_S_complete() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
local first=${COMP_WORDS[1]} | |
case ${COMP_CWORD} in | |
1) | |
COMPREPLY=( $(compgen -W "$(find $SCRIPT_DIRECTORIES -maxdepth 1 -type f -printf '%f\n')" -- $cur) ) | |
;; | |
*) | |
if [[ $cur == -* ]] |
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 | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from time import sleep | |
driver = webdriver.Firefox() | |
driver.get('http://10fastfingers.com/typing-test/english') | |
def write_words(): |
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/python2 | |
# rudimentary script to cheat on 10fastfingers.com (yeah this is useless) | |
# requires gnome-screenshot, imagemagick (convert), xte and tesseract (+ data-eng) | |
import subprocess | |
def h_exec(cmd): | |
""" Exec command and return stdout as string""" | |
proc = subprocess.Popen(cmd,stdout=subprocess.PIPE) | |
return ("".join(filter(lambda x:x and x!='\n', proc.stdout.readlines()))).replace("\n", " ") |
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
\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16\x5b\x31\xc0\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x4e\x41\x41\x41\x41\x42\x42\x42\x42 |
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 irc.client | |
import math | |
import base64 | |
import zlib | |
first = True | |
def on_connect(connection, event): | |
connection.join('#root-me_challenge') |
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
bool is_big_endian() | |
{ | |
short i = 0x0102; | |
return *(char*)(&i) == 1; | |
} |
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
FILE *fp; | |
char cmd[1024]; | |
char out[1024]; | |
sprintf(cmd, "lsof -p %d 2> /dev/null | grep TCP | awk '{print $9}'", getpid()); | |
fp = popen(cmd, "r"); | |
if (fp == NULL) { | |
printf("Failed to run command\n"); | |
exit(1); | |
} |