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 java.net.URI | |
import io.Source | |
object FipsCode { | |
def forStateAndCounty(state: String, county: String): Option[String] = | |
fipsCodeLookup.get((state, county)) | |
lazy val fipsCodeLookup = { | |
val url = ((URI create "http://www.census.gov/geo/www/ansi/national.txt") toURL) | |
((for (line <- Source.fromInputStream(url.openStream()).getLines(); |
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
#!/usr/bin/env bash | |
function checkout_and_push { | |
git checkout $1 && git push origin $1 | |
} | |
git branch -r | cut -c 10- | grep -ve '^HEAD' | while read i; do checkout_and_push $i; done |
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
external_nic=0:c:29:18:ec:10 | |
external0_ip=dhcp | |
external0_netmask=... | |
external0_gateway=... |
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
{ | |
"alias": "hadoop", | |
"max_physical_memory": 16192, | |
"quota": 1024, | |
"dataset_uuid": "6344c3f4-64d9-11e2-af3d-af797e5b19ca", | |
"nics": [ | |
{ | |
"nic_tag": "external", | |
"vlan_id": 6, | |
"ip": "10.100.0.87", |
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
dpkg --get-selections | grep linux-image- | grep generic | cut -f 1 | head -n-1 | tr '\n' ' ' | xargs apt-get --assume-yes purge |
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
if [ ! "$SSH_AUTH_SOCK" ]; then | |
eval $(ssh-agent) | |
ssh-add "$SDC_CLI_IDENTITY" | |
fi |
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
pkgin up | |
pkgin in -y erlang postgresql92-server ImageMagick build-essential scmgit unzip | |
curl -L https://github.com/downloads/basho/rebar/rebar > /opt/local/bin/rebar | |
chmod +x /opt/local/bin/rebar | |
groupadd zotonic | |
useradd -m -s /usr/bin/bash -G zotonic zotonic | |
vim /var/pgsql/data/pg_hba.conf | |
# add lines above any uncommented rules (trim leading hash on each line) | |
## Postgres off the ground settings | |
#local all postgres ident |
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
bash -c ' | |
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
if [ ! -f /opt/local/bin/chef-client ]; then | |
pkgin -f -y update | |
pkgin -f -y upgrade | |
pkgin -y install build-essential $(pkgin se rubygems | grep rubygems | cut -d" " -f1 | head -n1) pkg-config | |
gem install ohai --no-ri --no-rdoc | |
gem install chef --no-ri --no-rdoc <%= bootstrap_version_string %> |
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 | |
curl https://gist.githubusercontent.com/AlainODea/6321603/raw/760ebf43a2f48a78d99b8ca6dbc98a4b84684647/isc-dhcpd-smf.xml > /opt/local/lib/svc/manifest/isc-dhcpd-smf.xml | |
svccfg import /opt/local/lib/svc/manifest/isc-dhcpd-smf.xml | |
echo Run 'svcadm enable svc:/pkgsrc/isc-dhcpd:default' to enable ISC DHCP Daemon after configuration |
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
!ipxe | |
set smartos-build 20130822T211238Z | |
set boot-url http://example.com/boot-isos | |
######## MAIN MENU ################### | |
:start | |
menu Welcome to iPXE's Boot Menu | |
item | |
item --gap -- ------------------------- Operating systems ------------------------------ | |
item smartos Boot SmartOS (${smartos-build}) |
OlderNewer