Skip to content

Instantly share code, notes, and snippets.

View codematix's full-sized avatar

Ranganath Kini codematix

View GitHub Profile
@codematix
codematix / list.txt
Created September 28, 2021 15:43 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
apigateway.amazonaws.com
appflow.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
@codematix
codematix / keys.go
Created August 27, 2020 14:19 — forked from sdorra/keys.go
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@codematix
codematix / app.js
Created July 4, 2019 02:25 — forked from shibukawa/app.js
mithril lazy loading
var m = require("mithril");
m.mount(document.querySelector("#menu"), {
view: function() {
return m("ul", [
m("li", m('a[href="/a"]', {config: m.route}, "module A")),
m("li", m('a[href="/b"]', {config: m.route}, "module B")),
m("li", m('a[href="/c"]', {config: m.route}, "module C"))
]);
}
@codematix
codematix / private_fork.md
Created June 28, 2019 06:51 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@codematix
codematix / .gitignore
Created February 17, 2017 05:37 — forked from chichunchen/.gitignore
Git ignore binary files
# Ignore all
*
# Unignore all with extensions
!*.*
# Unignore all dirs
!*/
### Above combination will ignore all files without extension ###
@codematix
codematix / how-to-set-up-stress-free-ssl-on-os-x.md
Last active September 10, 2015 17:36 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

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"

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer

Thanks for stopping by!

PostgreSQL and Pgpool Architecture

@codematix
codematix / latency.txt
Created August 7, 2014 11:31 — forked from jboner/latency.txt
Latency Comparison Numbers
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms