Skip to content

Instantly share code, notes, and snippets.

View subramanyamchitti's full-sized avatar

Subramanyam Chitti subramanyamchitti

  • Bigcommerce
  • Sydney
View GitHub Profile

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

#!/usr/bin/env bash
set -e
if [ -e static ]; then
rm -r static
fi
mkdir -p static
sass src/sass/main.scss > static/application.css
$(npm bin)/browserify src/js/main.js > static/application.js
@simonw
simonw / how-to.md
Last active March 26, 2024 23:21
How to create a tarball of a git repository using "git archive"
@analytically
analytically / gist:1a6bdcfa711474d7ba24
Last active November 1, 2021 20:01
Ubuntu 14.04 AWS EC2 cloud-init (Kernel 3.18+NTP+ixgbevf+Docker+Route53) - to be used with ami-870a2fb7 and newer instance types (eg. t2, m3, c3, r3)
#!/bin/bash
set -e
sudo rm -f /etc/update-motd.d/10-help-text
sudo rm -f /etc/update-motd.d/51-cloudguest
sudo rm -f /etc/update-motd.d/91-release-upgrade
echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@rjurney
rjurney / cogroup_join_equivalent.pig
Created December 26, 2014 19:31
A Pig JOIN is just a COGROUP/FLATTEN
slugging_fatness_join = JOIN fatness BY player_id, slugging_stats BY player_id;
-- Equivalent
slugging_fatness_join = FOREACH
(COGROUP fatness BY player_id, slugging_stats BY player_id)
GENERATE
FLATTEN(fatness),
FLATTEN(slugging_stats);
@gangstead
gangstead / notes.md
Last active June 6, 2023 03:36
Typesafe webinar notes: Spray & Akka HTTP - Mathias Doenitz

Typesafe webinar notes: Spray & Akka HTTP

Presenter - Mathias Doenitz

Spary.io

  • embeddable http stack built on Akka actors
  • Just an HTTP integration layer, not for building full web apps
  • Server & client side
@diyan
diyan / i3.conf
Last active November 26, 2022 22:53
i3 tiling window manager configuration
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@railwaycat
railwaycat / Emacs_starter.pl
Last active March 12, 2023 01:26
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD