Skip to content

Instantly share code, notes, and snippets.

View anatolyg's full-sized avatar

Anatoly Geyfman anatolyg

View GitHub Profile
@anatolyg
anatolyg / README.md
Last active October 27, 2015 20:56
HCC Risk scores by county, D3 Portland Meetup, Oct 27, 2015

d3 + maps = webGIS

What is GIS

A geographic information system (GIS) is a system designed to capture, store, manipulate, analyze, manage, and present all types of spatial or geographical data. (wikipedia)

A GIS is great at finding places based on location, and helps to tie data to the location where that data occurred. Since it's also a database, it can do things like grouping, aggregations and lookups.

Modern GIS Stack

@anatolyg
anatolyg / README.md
Created October 26, 2015 22:53
d3 mapping
Verifying that +anatolyg is my openname (Bitcoin username). https://onename.io/anatolyg
@anatolyg
anatolyg / Vagrantfile
Created April 10, 2014 16:37
My local Elasticsearch test instance
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.network "private_network", ip: "10.0.0.11"
config.ssh.forward_agent = true
@anatolyg
anatolyg / es.sh
Last active August 29, 2015 13:58
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
sudo dpkg -i elasticsearch-1.1.0.deb
@anatolyg
anatolyg / template.html
Created November 2, 2013 04:26 — forked from tinabeans/template.html
Sample sane email template for good looking mobile / desktop email notifications and messaging.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@anatolyg
anatolyg / gist:6066626
Last active December 20, 2015 03:49
sometimes SBT causes java.lang.outofmemoryerror permgen space error, here's a fix

create new file in your home dir,

.sbtconfig

paste the following into the file:

SBT_OPTS="-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M"

package core.dao
import play.api.Logger
import reactivemongo.core.commands.LastError
import reactivemongo.core.errors.DatabaseException
import scala.concurrent.Future
import core.db.MongoHelper
import core.exceptions._
@anatolyg
anatolyg / .bashrc screen
Created March 15, 2012 02:08
always load screen when session starts
# add to bottom of your .bashrc
if [ "$TERM" != "screen" ]; then
#screen -D -R
#Update 2008 Dec 16: -xRR is way better
screen -xRR
fi
@anatolyg
anatolyg / gist:1360068
Created November 12, 2011 05:02 — forked from shripadk/gist:652819
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'