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
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
# | |
# This file consists of lines of the form: | |
# | |
# name = value | |
# | |
# (The "=" is optional.) Whitespace may be used. Comments are introduced with | |
# "#" anywhere on a line. The complete list of parameter names and allowed |
This file has been truncated, but you can view the full 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
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
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
. . 62: func read(db *sql.DB) { | |
. 4 63: rows, err := db.Query("SELECT name FROM users") | |
. . 64: if err != nil { | |
. . 65: log.Fatal(err) | |
. . 66: } | |
. . 67: defer rows.Close() | |
. . 68: | |
. . 69: users := []user{} | |
. 20 70: for rows.Next() { | |
. 3 71: user := user{} |
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 ( | |
"database/sql" | |
"flag" | |
"log" | |
"time" | |
_ "github.com/lib/pq" | |
) |
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
// This services listens on log queue and saves log to database. | |
package main | |
import ( | |
"log" | |
"time" | |
) | |
func main() { | |
jobChannel := make(chan (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
package main | |
import ( | |
"fmt" | |
kafka "github.com/Shopify/sarama" | |
zmq "github.com/pebbe/zmq4" | |
"os" | |
"os/signal" | |
"time" | |
) |
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
Vagrant.configure('2') do |config| | |
config.vm.box = 'ubuntu.13.10' | |
config.vm.box_url = 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.10_chef-provisionerless.box' | |
[3000, 3080, 3333, 4000, 8000, 8080].each do |port| | |
config.vm.network :forwarded_port, guest: port, host: port | |
end | |
config.ssh.forward_agent = true |
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
if [ -z $SSH_AUTH_SOCK ]; | |
then | |
eval `ssh-agent` > /dev/null | |
ssh-add ~/.ssh/id_rsa 2&> /dev/null | |
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
#!/usr/bin/env ruby | |
def reverse(n, reversing = 0) | |
if n == 0 | |
reversing | |
else | |
reverse(n / 10, n % 10 + reversing * 10) | |
end | |
end |
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 | |
def fibgen | |
prev, curr = 0, 1 | |
lambda do | |
temp = prev | |
prev = curr | |
curr += temp | |
temp | |
end |