Skip to content

Instantly share code, notes, and snippets.

View rohit-gohri's full-sized avatar
🗯️
....

Rohit Gohri rohit-gohri

🗯️
....
View GitHub Profile
@rohit-gohri
rohit-gohri / docusaurus.config.js
Last active November 19, 2021 16:05 — forked from sibelius/docusaurus.config.js
docusuarus webpack 5 plugin to provide node polyfills
module.exports = {
plugins: [require.resolve('./sitePlugin')],
}
@rohit-gohri
rohit-gohri / md-cal.sh
Created August 16, 2020 20:11 — forked from jdbrice/md-cal.sh
Generate markdown table calendar. Use wiki links to individual days
# Author: Daniel Brandenburg
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@rohit-gohri
rohit-gohri / iTerm2-ssh.zsh
Last active July 23, 2020 14:09 — forked from erangaeb/iTrem2-ssh.zsh
colorize ssh
# tabc <profile name> do the profile change
function tabc() {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi
# if you have trouble with this, change
# "Default" to the name of your default theme
echo -e "\033]50;SetProfile=$NAME\a"
}
# reset the terminal profile to Default when exit from the ssh session
function tab-reset() {

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
@rohit-gohri
rohit-gohri / ansible-summary.md
Created April 20, 2020 10:31 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of