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
#!/bin/sh | |
# Environment list | |
# $GOOS $GOARCH | |
# darwin 386 | |
# darwin amd64 | |
# freebsd 386 | |
# freebsd amd64 | |
# freebsd arm | |
# linux 386 |
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
#!/bin/sh | |
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}') | |
# Get Xcode CLI tools | |
# https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-3905972D-B609-49CE-8D06-51ADC78E07BC.dvtdownloadableindex | |
TOOLS=clitools.dmg | |
if [ ! -f "$TOOLS" ]; then | |
if [ "$OSX_VERS" -eq 7 ]; then | |
DMGURL=http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg | |
elif [ "$OSX_VERS" -eq 8 ]; then |
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
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
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
#!/bin/bash | |
tmp=$(mktemp -d) | |
pushd "$tmp" | |
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso | |
echo "fixing disk" | |
dd if=/dev/zero bs=2k count=1 of=tmp.iso | |
dd if=$iso bs=2k skip=1 >> tmp.iso | |
echo "mounting disk" |
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
Index: usr.sbin/bhyve/Makefile | |
=================================================================== | |
--- usr.sbin/bhyve/Makefile (revision 238860) | |
+++ usr.sbin/bhyve/Makefile (working copy) | |
@@ -8,6 +8,7 @@ | |
SRCS+= instruction_emul.c mevent.c | |
SRCS+= pci_emul.c pci_hostbridge.c pci_passthru.c pci_virtio_block.c | |
SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c post.c rtc.c uart.c xmsr.c | |
+SRCS+= pci_virtio_9p.c | |
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
function! s:quickrun_config() | |
return unite#sources#quickrun_config#quickrun_config_all() | |
endfunction | |
" quickrun-runner {{{ | |
" vimscript_all {{{ | |
let s:runner = {} |
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
'use strict'; | |
var keys = []; | |
var controlShift = [ 'ctrl', 'shift' ]; | |
var controlAltShift = [ 'ctrl', 'alt', 'shift' ]; | |
var margin = 10; | |
var increment = 0.1; | |
/* Position */ |
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 launchd plist file will run godoc all the time on port 6060. | |
To have launchd start godoc at login, put godoc.plist in ~/Library/LaunchAgents: | |
curl -L https://gist.github.com/kr/3de40737f0e2c50b3b3a/raw/godoc.plist | | |
sed s:YOUR_GODOC_HERE:`which godoc`: | | |
sed s:YOUR_GOPATH_HERE:$GOPATH: \ | |
>~/Library/LaunchAgents/godoc.plist | |
Then to load godoc right away: | |
launchctl load ~/Library/LaunchAgents/godoc.plist |
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 bash | |
# mostly from http://word.bitly.com/post/31921713978/static-analysis | |
function cfmt { | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: cfmt <file>" | |
else | |
astyle \ | |
--style=1tbs \ | |
--lineend=linux \ | |
--convert-tabs \ |
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
// +build ignore | |
// malloc test for false sharing | |
package main | |
import ( | |
"flag" | |
"runtime" |