Skip to content

Instantly share code, notes, and snippets.

View indykish's full-sized avatar

Kishorekumar Neelamegam indykish

View GitHub Profile
@indykish
indykish / libpostal_install.sh
Last active August 24, 2022 06:48 — forked from albarrentine/libpostal_install.sh
libpostal installation
# Pre-requisites: steps provided for Mac and Debian/Ubuntu
# 1. Install autotools if you don't have it already
# Mac: brew install autoconf automake libtool
# Ubuntu: apt-get install autotools-dev
# 2. Install snappy
# Mac: brew install snappy
# Ubuntu: apt-get install libsnappy-dev)
# For Ubuntu only
apt-get install autotools-dev
@indykish
indykish / playground.rs
Created September 10, 2020 18:55 — forked from anonymous/playground.rs
Rust code shared from the playground
mod db_schema{ // diesel generated schema
pub mod period {
pub struct table {}
pub struct tenant_id {}
}
pub mod category {
pub struct table {}
pub struct id {}
}
@indykish
indykish / whiteboardCleaner.md
Created May 21, 2020 11:59 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@indykish
indykish / playground.rs
Created December 31, 2019 06:22 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use chrono::prelude::*;
use regex::Regex;
#[macro_use]
extern crate lazy_static; // 1.4.0
/// A function when provided with the date in the format
/// YYYY/MM/DD or YYYY-MM-DD returns an output as YYYYMMDD
/// If the date is invalid it returns the today (now) YYYYMMDD
/// Hmm, I think its best to send back as none.
pub fn date_in_cobol_format(text: &str) -> Option<String> {
@indykish
indykish / playground.rs
Created December 31, 2019 06:22 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(unused)]
trait Foo {
fn bar(&self);
fn baz(&self);
}
struct MyStruct;
impl Foo for MyStruct {
fn bar(&self) {
let mut d = vec!["a", "b", "c", "d","e","f","g","h", "i", "l", "m"];
@indykish
indykish / bootstrap
Created November 10, 2019 13:38 — forked from mhart/bootstrap
Out-of-the-box AWS Lambda custom runtime (implemented in bash!)
#!/bin/sh
set -euo pipefail
# Handler format: <script_name>.<function_name>
# The script file <script_name>.sh must be located in
# the same directory as the bootstrap executable.
source $(dirname "$0")/"$(echo $_HANDLER | cut -d. -f1).sh"
while true
@indykish
indykish / Readme_VSCODE_FreeBSD
Created November 19, 2016 17:39 — forked from prash-wghats/Readme_VSCODE_FreeBSD
Notes for Building Electron and VSCode in FreeBSD11
Copy all the files to the build directory.
Copy icudtl.dat to the build directory. (you can find it in the vscode downloads ex for linux).
chromium version in port is 52.0.2743.116.
This was built with FreeBSD 11.0-RELEASE-p1. If building with other versions probably need to change
the freebsd versions in diff files (ex. freebsd11 => freebsd10)
Installed
node => v6.9.1
npm => 3.9.2
>chmod 755 vscode_build.sh
@indykish
indykish / dockerinstall_xenial.sh
Last active July 31, 2018 04:43 — forked from katopz/install-docker-exp.sh
Install Docker 1.12 on Ubuntu Xenial 16.04.1 x64
# Install Docker on Xenial 16.04.1 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get -y install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D