Skip to content

Instantly share code, notes, and snippets.

View codematix's full-sized avatar

Ranganath Kini codematix

View GitHub Profile
@codematix
codematix / buddyLists.jsx
Created September 16, 2015 17:05
Linked Dropdowns Approach 1
var _ = require('underscore'),
React = require('react/addons');
var LookupStore = global.dispatcher.getStore('LookupStore');
var MyComponent = React.createClass({
displayName: 'MyComponent',
getInitialState: function() {
return {
@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"
@codematix
codematix / url-regex.md
Last active August 29, 2015 14:22
Regular Expressions to match URL components

Documentation

  1. Scheme - The scheme name consists of a sequence of characters beginning with a letter and followed by any combination of letters, digits, +, ., or -. Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. The scheme name is followed by a colon :.
  2. Host Name - Hostname labels may contain only the ASCII letters a through z (in a case-insensitive manner), the digits 0 through 9, and the -. While a hostname may not contain other characters, such as the underscore character _, other DNS names may contain the underscore.
  3. Port Number - A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535.
  4. Path - If present, may optionally begin with a single forward slash /. It may not begin with two slash characters //. The path is a sequence of segments (conceptually similar to directories, though not necessarily representing them) separated by a forward s

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
{
"caret_style": "solid",
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"enable_tab_scrolling": false,
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",