reduce append calls for speedups
- http://golang.org/src/pkg/strconv/quote.go#L24
- http://golang.org/src/pkg/strconv/quote.go#L30
- http://golang.org/src/pkg/strconv/quote.go#L62
buf = append(buf, `\x`...)
require "formula" | |
class Sigmavpn < Formula | |
homepage "http://frozenriver.net/SigmaVPN" | |
url "https://codeload.github.com/neilalexander/sigmavpn/tar.gz/0.3alpha1" | |
sha1 "49020d4db52878756fbbc45c05c2deeedaa7b6d2" | |
head do | |
url 'https://github.com/neilalexander/sigmavpn.git' | |
end |
reduce append calls for speedups
buf = append(buf, `\x`...)
package mysql | |
import ( | |
"errors" | |
"fmt" | |
"runtime" | |
"time" | |
) | |
var trace = false |
#!/usr/bin/env ruby | |
# Just call this without arguments. It will show a friendly help text. | |
# For xterm-256color, it will even use colors for some commands! | |
class AppConfig | |
@@default_remote = 'vpn.example.com' | |
@@default_networks = '10.0.0.0/24>192.168.1.0/24' | |
@@default_subject = '/C=US/ST=CA/L=San Francisco/O=Example/OU=/CN={{name}}' |
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/hmac" | |
"crypto/rsa" | |
"crypto/sha1" | |
"crypto/x509" |
// Go MySQL Driver - A MySQL-Driver for Go's database/sql package | |
// | |
// Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved. | |
// | |
// This Source Code Form is subject to the terms of the Mozilla Public | |
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | |
// You can obtain one at http://mozilla.org/MPL/2.0/. | |
package mysql |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.Arrays; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.fail; | |
public final class TestHelper { | |
public static void test(Object[][] tests, Object target, String methodName, Class<?>...argsTypes) throws Exception { |
type closer interface { | |
Close() error | |
} | |
type errorMessage string | |
func (err errorMessage) Error() string { | |
return string(err) | |
} |
package main | |
import ( | |
"compress/gzip" | |
"fmt" | |
"io" | |
"os" | |
"strconv" | |
"time" | |
) |
#!/bin/bash | |
# exit on error, undeclared variables and pipe failures | |
set -e -u -o pipefail | |
# ansible is made for python 2.7+ | |
# TODO: check version(s) and provide better errors if anything fails | |
# install virtualenv if it's not installed yet | |
which -s virtualenv || (sudo easy_install pip && sudo pip install virtualenv) |