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
| # Demo http://ascii.io/a/3019 | |
| # build | |
| gdbb () { | |
| # build with debug flags | |
| go build -gcflags "-N -l" -o out | |
| # make sure the build didn't fail | |
| if [ $? != 0 ]; then return; fi |
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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| // The timeout handler. | |
| func ontimeout(t time.Time) { | |
| fmt.Println("[timeout] ", t) |
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
| /* ivan(a.t)mysqlab.net */ | |
| package main | |
| import ( | |
| "syscall" | |
| "os" | |
| "log" | |
| ) | |
| func daemon(nochdir, noclose int) int { |
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
| ### | |
| # 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 |
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 '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 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 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 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
| 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 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 '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 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 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| require 'date' | |
| class String | |
| def &(str) | |
| result = '' | |
| result.force_encoding("BINARY") |
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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/hex" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |