Skip to content

Instantly share code, notes, and snippets.

@dhaneshkk
dhaneshkk / sync-history.sh
Created August 7, 2020 16:24 — forked from jan-warchol/sync-history.sh
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
@dhaneshkk
dhaneshkk / export_db_structure.sh
Created July 18, 2020 03:26 — forked from ngocngv/export_db_structure.sh
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@dhaneshkk
dhaneshkk / pbcopyfy
Created July 18, 2020 03:25 — forked from garywoodfine/pbcopyfy
Simple Script to configure pbcopy like functionality on ubuntu
#!/bin/sh
# Copyright (C) 2009-2017 Three Nine Consulting
# Always good practice to update packages. However ask user if they would like to do so
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r
echo #adding new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt update
sudo apt upgrade -y

Keybase proof

I hereby claim:

  • I am dhaneshkk on github.
  • I am dhaneshkk (https://keybase.io/dhaneshkk) on keybase.
  • I have a public key ASBUuVVjAVf1eV1JSGp6ywK6Vq0QLH-Orzv2tO1L6433rQo

To claim this, I am signing this object:

conda create -n superbad scikit-learn pip ipython
source activate superbad
pip install -e fnawesome # installing into superbad site packages
ipython # runs superbad ipython
python # runs the environment's python with access to fnawesome
source deactivate
ipython # no access to fnawesome
@dhaneshkk
dhaneshkk / fp-lingo.md
Created May 28, 2016 19:14 — forked from ericelliott/fp-lingo.md
A Guide to Functional Programming Lingo for JavaScripters

A Guide to Functional Programming Lingo for JavaScripters

Functional programming gets a bad wrap about being too hard for mere mortals to comprehend. This is nonsense. The concepts are actually quite simple to grasp.

The jargon is the hardest part. A lot of that vocabulary comes from a specialized field of mathematical study called category theory (with a liberal sprinkling of type theory and abstract algebra). This sounds a lot scarier than it is. You can do this!

All examples using ES6 syntax. wrap (foo) => bar means:

function wrap (foo) {
@dhaneshkk
dhaneshkk / ultimate-ut-cheat-sheet.md
Created May 23, 2016 09:15 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


; journal created 2015-12-10 by hledger
; use http://plantuml.com/state.html for fianciial networkmap
; hledger add - cli to add transaction
2015/12/10 trip to supermarket
Expenses:Supplies ₹10
Assets:Saving ₹-10
2015/12/11 forgot the bread
Expenses:Food ₹5
Assets:Saving
@dhaneshkk
dhaneshkk / macdown.sh
Created December 9, 2015 05:25
Installing macdown
brew install caskroom/cask/brew-cask
brew cask install macdown