Skip to content

Instantly share code, notes, and snippets.

View hiranp's full-sized avatar
💭
Don't Panic... working on it!

HP hiranp

💭
Don't Panic... working on it!
View GitHub Profile
#!/bin/bash
#
# MYSQL CONFIG
# ============
# <UDF name="db_password" Label="Choose a MySQL Root Password" />
# <UDF name="db_name" Label="MySQL - Database Name" default="" example="Optionally create this database." />
# <UDF name="db_user" Label="MySQL - Username" default="" example="Optionally create this user." />
# <UDF name="db_user_password" Label="MySQL - Password" default="" example="The user password." />
#
# OPTIONAL LIBRARIES TO INSTALL
@hiranp
hiranp / comparison.md
Created December 17, 2015 17:17 — forked from makmanalp/comparison.md
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@hiranp
hiranp / menu_launcher.py
Last active January 7, 2021 16:33 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
import curses
import os
screen = curses.initscr() #initializes a new window for capturing key presses
@hiranp
hiranp / multiple_ssh_setting.md
Created May 7, 2020 00:09 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@hiranp
hiranp / docker-for-mac.md
Created July 30, 2020 21:13 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker for Mac Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@hiranp
hiranp / bash_strict_mode.md
Created August 6, 2020 20:11 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o pipefail explanation

set -e, -u, -o pipefail

The "set" lines These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing. With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.

set -euo pipefail is short for:

set -e
set -u

"People try to copy Netflix, but they can only copy what they see. They copy the results, not the process" - A.Cockcroft - AWS

Many case studies about migrating to microservices are about big organizations like Netflix, Google, Zalando, Facebook, Etsy, etc. What about smaller companies?

Each journey is different for every organization: what works for an org does not work for another. No golden-rule.

There are different circumstances:

@hiranp
hiranp / From monolith to microservices.md
Created September 19, 2020 03:19 — forked from xpepper/From monolith to microservices.md
My notes on Rodrigue Schaefer's talk "From monolith to microservices" at microXchg 2016

Rodrigue Schaefer: From monolith to microservices about some of the challenges of Zalando's transition from monolith to microservices (microXchg 2016)

Zalando history

  • 2008 started with a POC with magento => starts fine but does not scale very well

  • 2010 couldn't handle the raising load and traffic with magento

  • => so in 3 months they build their own system, based on Java, Spring, Postgres DB (a monolithic application)

@hiranp
hiranp / donotuse3.py
Created September 26, 2020 00:20 — forked from MineRobber9000/donotuse3.py
How to NEVER use lambdas - Python 3 edition
###########################################################
# How to NEVER use lambdas. An inneficient and yet educa- #
# tonal [sic] guide to the proper misuse of the lambda #
# construct in Python 3.x. [DO NOT USE ANY OF THIS EVER] #
# original by (and apologies to): e000 (13/6/11) #
# now in Python 3 courtesy of: khuxkm (17/9/20) #
###########################################################
## Part 1. Basic LAMBDA Introduction ##
# If you're reading this, you've probably already read e000's
@hiranp
hiranp / onenote_export.py
Created May 17, 2021 21:18 — forked from sspaeti/onenote_export.py
Onenote export to HTML. NOTE: This script is now maintained at https://github.com/Danmou/onenote_export
### README
# This Python scripts exports all the OneNote notebooks linked to your Microsoft account to HTML files.
## Output
# The notebooks will each become a subdirectory of the `output` folder, with further subdirectories
# for the sections within each notebook and the pages within each section. Each page is a directory
# containing the HTML file `main.html` and two directories `images` and `attachments` (if necessary)
# for the images and attachments. Any sub-pages will be subdirectories within this one.
## Setup