Skip to content

Instantly share code, notes, and snippets.

View shoaibi's full-sized avatar

Shoaibi shoaibi

View GitHub Profile
@shoaibi
shoaibi / pacman-repos.conf
Created June 25, 2015 21:58
My custom pacman repos
[xyne-any]
SigLevel = PackageRequired
Server = http://xyne.archlinux.ca/repos/xyne
[repo-ck]
SigLevel = Never
Server = http://repo-ck.com/$arch
[atlassian]
@shoaibi
shoaibi / shoaibi-sysctl.conf
Created June 25, 2015 22:01
My sysctl overrides
# /etc/sysctl.d/99-shoaibi.conf
fs.file-max = 2097152
fs.inotify.max_user_watches = 524288
kernel.hung_task_panic = 1
kernel.hung_task_timeout_secs = 300
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.panic = 5
kernel.panic_on_oops = 1
kernel.pid_max = 65536
@shoaibi
shoaibi / liquidpromptrc
Created June 25, 2015 22:04
liquidpromptrc
# ~/.config/liquidpromptrc
####################################
# LIQUID PROMPT CONFIGURATION FILE #
####################################
# If you want to use different themes and features,
# you can load the corresponding files here:
#source ~/.config/liquidprompt/nojhan.theme
#LP_PS1_FILE="~/.config/liquidprompt/nojhan.ps1"
@shoaibi
shoaibi / redshift.conf
Created June 25, 2015 22:04
redshift.conf
; ~/.config/redshift.conf
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=0
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=manual
adjustment-method=vidmode
@shoaibi
shoaibi / javascript-notes.md
Last active August 29, 2015 14:23
Javascript notes

General

  • Comment
    • Single line comment: //
    • Multiline comment /* */
  • Combining multiple initialization is better as JS Engine would be faster at executing a single statement
var first = 10,
    second = 15,
 third = "third";
@shoaibi
shoaibi / jira-ticket-title-to-gitflow-branch.sh
Created September 3, 2015 10:36
A simple script script to generate a git-flow like branch name and check it out
#!/bin/bash
# Change this to your name initials
user_initials="ms"
E_BADARGS=65
if [ $# -lt 1 -a $# -gt 3 ]; then
>&2 echo "Usage: $0 jira_ticket_title [ticket_type_or_branch_prefix=feature] [checkout=1]"
exit $E_BADARGS
fi
@shoaibi
shoaibi / Redis-notes.md
Last active October 13, 2015 04:03
Redis notes

#Redis

  • Binary Safe Strings
  • More than just a kv store
  • Most insert commands are variadic

Keys

  • Bit arrays so could be nice and shiny strings like app:user:group or binary data from png.
  • Long keys aren't a good idea
  • Keys are like urls and hence should be readable and pretty
@shoaibi
shoaibi / MongoDb-notes.md
Last active October 14, 2015 14:41
MongoDb notes

MongoDb

  • Dynamic schema, not schema-free.
  • Database
    • Collection
      • Document
        • Field

BSON

@shoaibi
shoaibi / LevelDb-notes.md
Created October 17, 2015 05:47
LevelDb notes

LevelDb

Features

  • embedded
  • light weight
  • thread safe
  • fast
  • good compression
  • arbitrary byte arrays
  • sorted by keys
@shoaibi
shoaibi / HTTP-Cache.md
Last active December 13, 2015 16:36
Few notes regarding how to work with HTTP Cache

General

  • Works only for safe HTTP methods, say like GET and HEAD, methods that shouldn't mutate application state.

Places where caching can occur

  • Browser (private and public)
  • Proxy (public)
  • Gateway/Reverse Proxy (public)

Caching Strategy