Skip to content

Instantly share code, notes, and snippets.

View anatolyg's full-sized avatar

Anatoly Geyfman anatolyg

View GitHub Profile
@anatolyg
anatolyg / ... and my theme
Created April 6, 2011 03:34
I am using oh-my-zsh
# provides a prompt in the following manner:
# name@machine path [git branch●] »
# where ● == color coded ball based on status of branch
# red means uncommitted, yellow means committed but not not pushed, green means up to date
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{28}●'
zstyle ':vcs_info:*' unstagedstr '%F{11}●'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
@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'
@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
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 / 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"

@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 / 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 / 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
Verifying that +anatolyg is my openname (Bitcoin username). https://onename.io/anatolyg
@anatolyg
anatolyg / README.md
Created October 26, 2015 22:53
d3 mapping