Skip to content

Instantly share code, notes, and snippets.

View abloom's full-sized avatar

Andrew Bloom abloom

  • Turquoise Health
  • Chicago Il
View GitHub Profile
sudo mkdir -p /opt/local
sudo chown "$USER":admin /opt/local
brew install postgresql@15 proj gettext protobuf-c json-c sfcgal pcre2 icu4c geos gdal
mkdir -p /opt/local/bin
ln -s `which postgres` /opt/local/bin/postgres
wget https://download.osgeo.org/postgis/source/postgis-3.4.2.tar.gz
tar -xzvf postgis-3.4.2.tar.gz
class Gene
def init(line = ""):
for pair in line.split(";"):
splits = pair.split(" ")
if len(splits) == 2:
key = pair.split(" ")[0]
value = pair.split(" ")[1] # TODO add some code to remove the quotes from the result
self.data[key] = data
def get(field):
#!/usr/bin/env bash
VARIABLE=1234
grep "Value=$VARIABLE" example.txt
@abloom
abloom / email.md
Last active August 29, 2015 14:10
[Action Item] skeletor_node hostclass update

Dear I-Tiers,

We've just completed testing an updated hostclass: skeletor_node-2014.11.21_22.42.

Changes since the previous release are minimal, just version bumps for logstash and groupon monitoring packages.

A few weeks ago David Bushong reported an issue with 1 of their many servers writing invalid lines to /var/groupon/logstash/log/logstash-metric.log. It seems the failure is rare, but the updated packages will make sure it never happens to your machines.

As always make sure to test this on UAT and Staging before scheduling and updating Production.

UUID Generation: undefined - undefined
Instrumentation Start UUID: e433af606ea111e48127a1475febc159
Profiler Start UUID: e433af606ea111e48127a1475febc159
Instrumentation End UUID: e433af606ea111e48127a1475febc159
Profiler End UUID: e433af606ea111e48127a1475febc159
UUID Generation: undefined - undefined
Instrumentation Start UUID: e56fd8e06ea111e48127a1475febc159
Blog.find({} function(err, docs) {
if (err) {
cb(err, null);
} else {
console.log(docs);
}
});
{"html":"<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n <script>\n BOOMR = {};\n BOOMR[\"t_lstart\"] = new Date().getTime();\n var optimizeSuiteData = {\n cookieDomain: \".groupon.com\",\n pageType: \"{{pageType}}\",\n division: \"chicago\",\n country: \"us\",\n channel: \"{{channel}}\" || \"main\"\n };\n var clientOptimizeConfig =\n {{#clientOptimizeConfig}}{{{clientOptimizeConfig}}}{{/clientOptimizeConfig}}\n {{^clientOptimizeConfig}}{}{{/clientOptimizeConfig}}\n;\n </script>\n <script>window.JSON || document.write('<script src=\"//local.groupon.com/layout/js/json2.js\">\\x3C/script>')</script>\n <title>{{title}}</title>\n <link href=\"//local.groupon.com/layout/assets/gig_application_layout-favicon.ico\" rel=\"shortcut icon\">\n <link href=\"http://feeds.feedburner.com/groupon\" rel=\"alternate\" title=\"RSS\
describe 'mean' do
let(:array_1) { [1, 2, 3, 4, 5, 5, 7] }
let(:array_2) { [4, 4, 5, 5, 6, 6, 6, 7] }
it "is defined as a method" do
defined?(mean).should eq 'method'
end
https://dl.dropboxusercontent.com/u/566422/html5-boilerplate.zip
function createMy() {
var my = {},
privateVariable = 1;
function privateMethod() {
// ...
}
my.moduleProperty = 1;
my.moduleMethod = function () {