Skip to content

Instantly share code, notes, and snippets.

View ganeshan's full-sized avatar

Ganeshan Venkataraman ganeshan

  • Sterling,MA
View GitHub Profile
@ganeshan
ganeshan / allCountries_formatting
Created December 24, 2016 17:05 — forked from mejackreed/allCountries_formatting
Cleaning up GeoNames for Solr
# Reduce the columns
cut -f1-2,5-6 allCountries.txt > allCountries_red.txt
# Add a header row
sed '1s/^/id title_s lat lng\
/g' allCountries_red.txt > allCountries_head.txt
# Add wkt requires csvpys https://github.com/cypreess/csvkit/blob/master/docs/scripts/csvpys.rst
csvpys --tab -s wkt_rpt "'POINT(' + ch['lng'] + ' ' + ch['lat'] + ')'" allCountries_head.txt > allCountries_wkt.txt
@ganeshan
ganeshan / ServiceStackLinks.txt
Last active January 17, 2017 10:51
ServiceStack Links
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Dapper;
// to have a play, install Dapper.Rainbow from nuget
@ganeshan
ganeshan / AsyncDapperDemo.cs
Created June 11, 2017 13:14 — forked from jsauve/AsyncDapperDemo.cs
Async Dapper Demo. Includes buffered and non-buffered connection helpers.
using System;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using Dapper;
public class Program
{
public static void Main()
@ganeshan
ganeshan / package.json
Created July 13, 2017 21:09
package.json that works with latest version of angular cli and ag-grid
{
"name": "ag-grid-cli",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
@ganeshan
ganeshan / .bash_profile
Created September 10, 2017 14:22 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ganeshan
ganeshan / adminer_setup.sh
Created March 2, 2018 14:18 — forked from zloynemec/adminer_setup.sh
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i

Keybase proof

I hereby claim:

  • I am ganeshan on github.
  • I am ganeshan (https://keybase.io/ganeshan) on keybase.
  • I have a public key ASCEA-YUBmKvhsB16fmfhgHCOjLJjJMoZIxZaLUqikpM7go

To claim this, I am signing this object:

@ganeshan
ganeshan / README.md
Created June 1, 2018 12:11 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@ganeshan
ganeshan / ClassLoaderLeakExample.java
Created August 8, 2018 07:20 — forked from dpryden/ClassLoaderLeakExample.java
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,