Skip to content

Instantly share code, notes, and snippets.

View indykish's full-sized avatar

Kishorekumar Neelamegam indykish

View GitHub Profile
@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 / 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 / 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 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 / 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