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
config defaults | |
option syn_flood '1' | |
option input 'ACCEPT' | |
option output 'ACCEPT' | |
option forward 'REJECT' | |
option drop_invalid '0' | |
config zone | |
option name 'lan' |
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
import Data.List | |
data STree a = Empty | Node (STree a) a (STree a) | |
deriving (Eq, Ord, Show) | |
bft :: [STree a] -> [[a]] | |
bft = unfoldr f | |
where f x = case x of | |
[] -> Nothing |
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
#!/bin/bash | |
# This script is intended to be used with the install action | |
# of puppet-cloudpack | |
set -u | |
set -e | |
function fedora_repo() { | |
cat >/etc/yum.repos.d/puppet.repo <<'EOFYUMREPO' | |
[puppetlabs] |
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
class Batch | |
constructor: (@keyspace) -> | |
@statements = [] #list of statements aka insert delete update | |
toCQL: -> | |
"BEGIN BATCH | |
#{(stmt.toCQL() for stmt in @statements).join "\n"} | |
APPLY BATCH" |
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
pg = require "./" | |
utils = require "./lib/utils" | |
utils.prepareValue = (val) -> | |
if val instanceof Date then return JSON.stringify val | |
if typeof val is 'undefined' then return null | |
if val instanceof Array then return "{#{val.join ", "}}" | |
val is null ? null : val.toString() |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node { | |
stroke: #fff; | |
stroke-width: 1.5px; | |
} | |
.link { |
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
class Batch | |
constructor: (@keyspace) -> | |
@statements = [] #list of statements aka insert delete update | |
toCQL: -> | |
"BEGIN BATCH | |
#{(stmt.toCQL() for stmt in @statements).join "\n"} | |
APPLY BATCH" |
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
pg = (require "./").native | |
client = new pg.Client() | |
#client.on "error", (error) -> console.log error # this one works | |
client.connect((error)-> console.log error) # this one does not work |
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
make test-native connectionString=pg://postgres:5432@localhost:5432/postgres | |
gyp info it worked if it ends with ok | |
gyp info using node-gyp@0.5.6 | |
gyp info using node@0.8.1 | |
gyp info spawn python | |
gyp info spawn args [ '/home/borgers/.node-gyp/0.8.1/tools/gyp_addon', | |
gyp info spawn args 'binding.gyp', | |
gyp info spawn args '-I/home/borgers/projects/node-postgres/build/config.gypi', | |
gyp info spawn args '-f', | |
gyp info spawn args 'make' ] |
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
# fork http traffic | |
# e.g. proxy is your production system | |
# and proxy2 your testing setup | |
http = require "http" | |
PRODUCTION_HOST = "localhost" | |
PRODUCTION_PORT = 8081 | |
TESTING_HOST = "localhost" | |
TESTING_PORT = 8082 |