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
print "Hello World." |
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 branch --merged | grep -v "master" | xargs git branch -d |
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 config *Configuration // A global we'll reuse for the application | |
// Defining the structure of the JSON as we'll expect it | |
type Configuration struct { | |
Port int // Port the app is served on | |
Db_Type string | |
Db_Username string | |
Db_Password string | |
Db_Host string | |
DB string |
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 ( | |
"database/sql" // Needs the mysql driver so we can connect to the DB. | |
"net/http" | |
"log" | |
_ "github.com/go-sql-driver/mysql" // Importing mysql driver for its side-effects, no implicit use | |
"github.com/gorilla/mux" | |
) |
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 ( | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
func main() { | |
r := mux.NewRouter() |
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
# You can change 1000 to whatever you want | |
awk '{n=split($8, b,"/"); if(b[n] >= 1000) print}' your_haproxy_log.log |
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
.johnny .cant .touch .this { | |
align: left; | |
} |
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
def job_files(path=".") | |
Dir.glob("#{path}/**/*").select { |path| File.file?(path) } | |
end | |
puts job_files("ok") |
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 'mechanize' | |
a = Mechanize.new | |
a.get('https://us.etrade.com/home') do |page| | |
mypage = page.form_with(:action => '/login.fcc') do |f| | |
f.USER = ARGV[0] | |
f.PASSWORD = ARGV[1] | |
end.click_button |
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
jQuery.getJSON( | |
'http://api.tumblr.com/v2/blog/codingjester.tumblr.com/posts?api_key=<api_key>&jsonp=?', | |
function(d) { | |
console.log(d); | |
}); |
NewerOlder