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
| #!/bin/sh | |
| #-------- | |
| # Command line thesaurus | |
| BROWSER="/usr/bin/env lynx -source" | |
| HTML2TEXT="/usr/bin/env html2text -style compact" | |
| WEBSITE="http://thesaurus.reference.com/search?q=$1" | |
| if test $1; then | |
| ${BROWSER} ${WEBSITE} | ${HTML2TEXT} | ${PAGER} |
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
| #!/usr/bin/env ruby | |
| # 25s curl -o all.gz.curl http://download.openwall.net/pub/passwords/wordlists/all.gz | |
| # 11s for this script with 4 parallel requests | |
| require 'typhoeus' | |
| def pfetch(url, splits=4) | |
| response = Typhoeus.head(url) | |
| parallelize = false | |
| basename = File.basename(url) | |
| size = nil |
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
| require 'formula' | |
| class Torrentcheck < Formula | |
| url 'http://sourceforge.net/projects/torrentcheck/files/torrentcheck-1.00.zip' | |
| homepage 'http://torrentcheck.sourceforge.net/' | |
| sha256 'a839f9ac9669d942f83af33db96ce9902d84f85592c99b568ef0f5232ff318c5' | |
| def install | |
| inreplace "torrentcheck.c", "#include <malloc.h>", "" | |
| system "#{ENV.cc} #{ENV.cflags} torrentcheck.c sha1.c -o torrentcheck" |
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
| require 'net/ssh' | |
| require 'debugger' | |
| require 'net/ssh/transport/session' | |
| require 'net/ssh/authentication/methods/password' | |
| require 'net/ssh/authentication/session' | |
| options = { | |
| :user => 'root', | |
| :config => nil, | |
| :password => 'incorrect_password', |
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
| # coding=UTF-8 | |
| from __future__ import division | |
| import re | |
| # This is a naive text summarization algorithm | |
| # Created by Shlomi Babluki | |
| # April, 2013 | |
| class SummaryTool(object): |
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
| #!/usr/bin/env bash | |
| NOW=$(date +"%Y%m%d%H%M%S") | |
| echo -n "[*] bootstrapping " | |
| # Export CC to explicitly set the compiler used for cexts. | |
| export CC=cc | |
| function abspath { | |
| if [[ -d "$1" ]]; then | |
| pushd "$1" >/dev/null | |
| pwd |
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
| module Kernel | |
| alias :old_req :require | |
| def require(*args) | |
| puts "Require called with: #{args}" | |
| old_req *args | |
| end | |
| end | |
| require 'pp' |
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
| #!/usr/bin/env bash | |
| NOW=$(date +"%Y%m%d%H%M%S") | |
| if [ "$#" -eq 0 ];then | |
| echo "Usage $0 keyfile" | |
| echo " or $0 -a Convert all keys" | |
| exit | |
| fi | |
| function convert_file { |
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
| brew install python qt cryptopp swig sip qt | |
| wget http://download.sf.net/project/pyqt/sip/sip-4.13.3/sip-4.13.3.tar.gz | |
| tar xf sip-4.13.3.tar.gz | |
| cd sip-4.13.3 | |
| python configure.py | |
| make && make install | |
| wget http://www.riverbankcomputing.com/static/Downloads/PyQt4/PyQt-x11-gpl-4.10.2-snapshot-11b3001947c9.tar.gz | |
| tar xf PyQt-x11-gpl-4.10.2-snapshot-11b3001947c9.tar.gz |
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
| #!/bin/bash | |
| DATE="date +%Y%m%d%H%M%S" | |
| RDATE="date +%Y%m%d%H%M%S" | |
| IP='curl icanhazip.com' | |
| ENTROPY='cat /proc/sys/kernel/random/entropy_avail' | |
| LOG='heroku-entropy.log' | |
| touch $LOG | |
| while true; do | |
| heroku run "echo \"$($DATE),\$($RDATE),\$($IP),\$DYNO,\$($ENTROPY)\"" 2>&1 | egrep "^20" >> $LOG; | |
| done |