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
# Author:: Adam Jacob <adam@opscode.com> | |
# Author:: Joshua Timberman <joshua@opscode.com> | |
# | |
# Copyright 2009-2010, Opscode, Inc | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
require 'minitest/unit' | |
require 'minitest/spec' | |
require 'rubygems' | |
require 'ansi' | |
class MiniTest::Unit | |
include ANSI::Code | |
PADDING_SIZE = 4 |
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
# Original code for bash from: | |
# http://www.huyng.com/archives/quick-bash-tip-directory-bookmarks/492/ | |
# Zsh Directory Bookmarks | |
alias m1='alias g1="cd `pwd`"' | |
alias m2='alias g2="cd `pwd`"' | |
alias m3='alias g3="cd `pwd`"' | |
alias m4='alias g4="cd `pwd`"' | |
alias m5='alias g5="cd `pwd`"' | |
alias m6='alias g6="cd `pwd`"' |
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
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
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
require 'sinatra' | |
require 'redis' | |
require 'json' | |
require 'date' | |
class String | |
def &(str) | |
result = '' | |
result.force_encoding("BINARY") |
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
require 'rubygems' | |
require 'rest-client' | |
# Socksify is amazing handling Proxys, also Socks like tor | |
# The proxy is simply aviable in the whole script | |
require 'socksify' | |
TCPSocket::socks_server = "127.0.0.1" | |
TCPSocket::socks_port = 9070 | |
# Create a cookie |
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
var page = require('webpage').create(); | |
page.settings.loadImages = false; | |
page.onConsoleMessage = function(msg) { console.log(msg); }; | |
page.onLoadFinished = function() { | |
page.evaluate(function() { | |
var getFrames = function(doc) { | |
var frames = doc.querySelectorAll('iframe'); | |
for (var i = frames.length - 1; i >= 0; i--) { | |
var fdoc = frames[i].contentWindow.document; |
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/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
require 'rubygems' | |
require 'dnsruby' | |
include Dnsruby | |
$nameserver = Resolver.new | |
def dig domain, rrtype | |
search = $nameserver.query(domain, Types.send(rrtype)) | |
if rrtype == :NAPTR | |
search.answer.sort_by { |a| [ a.order, a.preference ] }.each { |rr| |
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
### | |
# Scheme code is translated to YARV byte code, then evaluated in the | |
# Ruby Virtual Machine | |
require 'rbconfig' | |
require 'dl' | |
require 'fiddle' | |
require 'strscan' | |
class RubyVM |
OlderNewer