Skip to content

Instantly share code, notes, and snippets.

yegeniy / pom.xml
Last active Apr 27, 2017
Maven Sandbox. Note that `` should be put under `src/main/java`
View pom.xml
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<name>Java Sandbox</name>
yegeniy /
Last active Apr 27, 2017
Sandbox for standard java library
import java.util.*;
public class MainClass {
public static void main(String[] args) {
View .yaml
- match: \b(catch)\b
- meta_scope:
- match: (?=\))
pop: true
- include: catch-clause
yegeniy /
Created Jan 18, 2013
csv2json Copied from somewhere on the internet. Usage to get the json into an expanded format and into your clipboard: `python myfile.csv | python -m json.tool | pbcopy`
import sys, csv, json
if len(sys.argv) == 1:
print "1 argument for filename required"
gdoc = csv.reader(open(sys.argv[1]))
# Get the 1st line, assuming it contains the column titles
fieldnames =
yegeniy / gist:3885248
Created Oct 13, 2012
Why does slf4j overload its Logger.debug methods instead of using a single method with varargs?
View gist:3885248

slf4j's Logger.debug is a perfect example of item 42 in Effective Java 2nd Edition (on varargs), but I have a question.

I believe that they have found that the vast majority of use cases of debug have 2 or less arguments and that by over loading the methods with 0,1,2 arguments, the implementation is able to avoid allocating an array?

   * Log a message at the DEBUG level.
   * @param msg the message string to be logged
yegeniy /
Created Apr 12, 2012
Dev environment setup on Ubuntu for PHP, Mongo, MySQL

Install php

sudo apt-get install -y php5-common libapache2-mod-php5 php5-cli curl libcurl3 libcurl3-dev php5-curl php5-mcrypt php5-ldap php5-gd php5-mysql phpunit php-pear

sudo pear upgrade pear
sudo pear channel-discover
sudo pear channel-discover
sudo pear channel-discover
sudo pear install --alldeps phpunit/PHPUnit
yegeniy /
Last active Feb 9, 2017
git: commands I commonly use, relevant ramblings, and configuration.

Commands I Commonly Use

  1. Clone an existing repository:

    git clone <repo>


  2. [Checkout and pull an existing branch][gcp]: