Skip to content

Instantly share code, notes, and snippets.

View abhiche's full-sized avatar
🎯
Focusing

Abhilash Chelankara abhiche

🎯
Focusing
  • Remote
View GitHub Profile
defmodule MyApp.HTTPClient do
@moduledoc """
This module should be used to make http requests
"""
require Logger
require OK
defp decode_json(body) do
case Jason.decode(body) do
{:ok, decoded} -> decoded
za Toggle folds
c-r Redo
u Undo
c-p Search file
c-n Toggle nerdtree
c-s Search text in folder
s-h Move window left
s-l Move window right
c-h Move to left buffer
c-l Move to right buffer
@abhiche
abhiche / readme.md
Last active August 18, 2020 05:20 — forked from celso/init.vim
Neovim setup for OSX users

Neovim setup for OSX users

This gist is a list of options and tricks to make the amazing neovim work on OSX, from a former long time vim user.

@abhiche
abhiche / india_state_city_db_dump.sql
Created May 1, 2020 04:20
India state district subdistrict sql dump
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `geo_locations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`external_id` varchar(10) DEFAULT NULL,
`location_type` varchar(20) NOT NULL,
`pin` varchar(10) DEFAULT NULL,
@abhiche
abhiche / android-emulator-homebrew.sh
Last active July 15, 2020 04:45
Install android emulator via homebrew
touch ~/.android/repositories.cfg
brew cask install homebrew/cask-versions/adoptopenjdk8
brew cask install android-sdk
brew cask install intel-haxm
brew install qt
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
sdkmanager "platform-tools" "platforms;android-27" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;27.0.0" "system-images;android-27;google_apis;x86" "emulator"
avdmanager create avd -n test -k "system-images;android-27;google_apis;x86"
/usr/local/share/android-sdk/emulator/emulator -avd test
@abhiche
abhiche / csv-parser.js
Last active April 4, 2018 13:27
Using streams to parse and transform CSV - NodeJS
const csv = require('csv');
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
// Copied from SO
/**
* @param {Promise} promise
*/
function reflect(promise) {
return promise
.then(d => {
return {