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
data "archive_file" "example" { | |
output_file_mode = "0666" # before umask | |
output_path = "${path.module}/example.zip" | |
source_file = "${path.module}/example/index.js" | |
type = "zip" | |
} | |
data "aws_apigatewayv2_apis" "substrate" { | |
name = "Substrate" | |
protocol_type = "HTTP" |
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
# Mac rxvt-unicode setup. | |
# http://rcrowley.org/articles/rxvt-unicode.html | |
# Install dependencies from MacPorts and CPAN. | |
sudo port install rxvt-unicode +xterm_colors_256 | |
sudo port install terminus-font | |
sudo cpan install Mac::Pasteboard | |
# Run urxvt at X11 startup. | |
defaults write org.x.X11 app_to_run /opt/local/bin/urxvt |
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 ( | |
"log" | |
"net" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"time" |
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
// Go encourages us to organize our code using goroutines and to use | |
// channels of channels to implement request-response semantics [1]. | |
// | |
// I have encountered far more instances that require acknowledgment | |
// than fully-fledged respones so I became curious whether channels | |
// of channels were indeed the best implementation strategy. | |
// | |
// In summary, yes, they are. These benchmarks demonstrate that | |
// channels perform better than mutexes, that condition variables are | |
// still clumsy, and that preallocation is a huge win when and if you |
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 ( | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"os/exec" | |
"reflect" | |
"syscall" |
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
stage { "pre": before => Stage["main"] } | |
class python { | |
package { | |
"build-essential": ensure => latest; | |
"python": ensure => "2.6.6-2ubuntu1"; | |
"python-dev": ensure => "2.6.6-2ubuntu1"; | |
"python-setuptools": ensure => "latest"; | |
} | |
exec { "easy_install pip": | |
path => "/usr/local/bin:/usr/bin:/bin", |
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
modules { | |
module { | |
name = "python_module" | |
path = "/usr/lib/ganglia/modpython.so" | |
params = "/usr/lib/ganglia/python_modules" | |
} | |
} | |
include ('/etc/ganglia/conf.d/*.pyconf') |
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
// It seems that Go's archive/zip does not preserve the | |
// executable bit on input files on Mac OS. It does, so | |
// something else is fishy, but I'll preserve this for | |
// posterity and further thinking about what's wrong. | |
package zipadeedoodah | |
import ( | |
"archive/zip" | |
"io/ioutil" | |
"os" |
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
VERSION="0.9.9" | |
BUILD="betable1" | |
set -e -x | |
# Keep track of the original working directory. | |
OLDESTPWD="$PWD" | |
# Work in a temporary directory. | |
cd "$(mktemp -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
import os | |
import os.path | |
import sys | |
from graphite.render.hashing import ConsistentHashRing | |
instances = [] | |
unwelcome_instances = [] | |
for arg in sys.argv[1:]: | |
unwelcome = False |
NewerOlder