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
.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
# 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
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
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
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
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
require 'mail' | |
load 'mrbananagrabber.rb' | |
module Mail | |
def self.to_hash | |
puts "ok" | |
end | |
end | |
x = Mail.new STDIN.read |
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
function log_me(data){ | |
console.log(data); | |
} | |
jQuery.ajax({url: "http://api.tumblr.com/v2/blog/scipsy.tumblr.com/info?api_key={YOUR-KEY}&jsonp=log_me", dataType: "jsonp"}); |
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 python | |
import oauth2 as oauth | |
import urlparse | |
import urllib | |
consumer_key = '<your-key-here>' | |
consumer_secret = '<your-secret-key-here>' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' |
OlderNewer