Skip to content

Instantly share code, notes, and snippets.

View prakhar1989's full-sized avatar
I may be slow to respond.

Prakhar Srivastav prakhar1989

I may be slow to respond.
View GitHub Profile
@prakhar1989
prakhar1989 / tunings.md
Created May 5, 2023 00:11
Ola Englund - The Chug Project - Tunings

B Tuning (7 String)

  • Please respong
  • Sweet baby zacharino
  • Heavy Bones
  • Beanbag Boredom

Drop C

  • Discord Shore
@prakhar1989
prakhar1989 / attendance.py
Created January 6, 2019 15:19
attendance
#!/Users/prsrivastav/miniconda3/bin/python3.7
import csv
from dataclasses import dataclass
from datetime import datetime
from typing import List
DATE_FORMAT = "%d-%m-%Y"
❯ npm run test
> react-tag-input@4.8.2 test /Users/prsrivastav/Code/react-tags
> jest --notify --coverage
FAIL test/suggestions.test.js
● Test suite failed to run
TypeError: Cannot read property 'ReactCurrentOwner' of undefined
@prakhar1989
prakhar1989 / uscis.js
Created December 16, 2016 21:53
OPT status check
/**
* npm install superagent cheerio
* node index.js <your_case_number>
*/
const request = require('superagent');
const cheerio = require('cheerio');
const URL = "https://egov.uscis.gov/casestatus/mycasestatus.do";
const receipt = process.argv[2];
@prakhar1989
prakhar1989 / replify
Created August 19, 2016 20:17 — forked from danielrw7/ replify
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for [%s]\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "\n%s> " "$command"
@prakhar1989
prakhar1989 / hacker-rank.ml
Created July 28, 2016 23:37
Hacker Rank Prologue
let (|>) v f = f v;;
let comp f g = (fun x -> f (g x));;
let read_ints () : int list =
let rec aux nums =
try let i = read_int () in aux (i :: nums)
with End_of_file -> nums
in
List.rev (aux [])
;;
@prakhar1989
prakhar1989 / java.md
Last active April 18, 2018 16:50
Java Reading Notes

Java Lambdas and Closures

Chapter 1 - Intro

Google Guava Implementation of cloneWithoutNulls(List)

public static <A> List<A> cloneWithoutNulls(final List<A> list) {
 Collection<a> nonNulls = Collections2.filter(list, Predicates.notNull());</a>
@prakhar1989
prakhar1989 / index.js
Last active July 9, 2016 14:48
requirebin sketch
// Since RequireBin doesn't (yet) support JSX, you'll have to write JS in order
// for this to work. Quick hack: Head to http://babeljs.io/repl, write JSX, copy // paste the compiled JS here.
const React = require('react');
const ReactDOM = require('react-dom');
const ReactTags = require('react-tag-input').WithContext;
const _ = require('underscore');
const countries = require('country-list')();
const suggestions = _.pluck(countries.getData(), 'name');
@prakhar1989
prakhar1989 / esnextbin.md
Created July 6, 2016 01:23
esnextbin sketch
@prakhar1989
prakhar1989 / bling.js
Created June 10, 2016 13:43 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;