Skip to content

Instantly share code, notes, and snippets.

View vishaltelangre's full-sized avatar

Vishal Telangre vishaltelangre

View GitHub Profile
@jbenet
jbenet / simple-git-branching-model.md
Last active July 21, 2025 21:02
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@konklone
konklone / ssl.rules
Last active May 31, 2025 01:44
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email [email protected].
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
Knuth: Structured Programming with go to Statements
http://cs.sjsu.edu/~mak/CS185C/KnuthStructuredProgrammingGoTo.pdf
There is no doubt that the grail of efficiency leads to abuse. Programmers waste enormous amounts
of time thinking about, or worrying about, the speed of noncritical parts of their programs, and
these attempts at efficiency actually have a strong negative impact when debugging and maintenance
are considered. We should forget about small efficiencies, say about 97% of the time: premature
optimization is the root of all evil.
Yet we should not pass up our opportunities in that critical 3 %.
@kmayer
kmayer / sidekiq.rb
Created September 8, 2013 17:41
Sidekiq Exception tracer for NewRelic Add this to your sidekiq initializer
module NewRelic
class SidekiqException
def call(worker, msg, queue)
begin
yield
rescue => exception
NewRelic::Agent.notice_error(exception, :custom_params => msg)
raise exception
end
end
@estum
estum / user.rb
Last active December 21, 2015 05:49
Migrate passwords from legacy systems to Devise
# updated variant of older solution:
# http://www.davidverhasselt.com/2012/05/13/how-to-migrate-passwords-from-legacy-systems-to-devise
class User < ActiveRecord::Base
# ...
def valid_password?(password)
if legacy_password?
# Use Devise's secure_compare to avoid timing attacks
@aras-p
aras-p / preprocessor_fun.h
Last active October 9, 2025 17:55
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@artagnon
artagnon / chennai-travel.txt
Created August 1, 2013 09:38
What to do in Chennai
I'll exclude what you can find easily on Wikitravel:
- The city organizes carnatic music concerts every now and then called
"kutcheris". Ask a friend interested in music to take you to one.
- It's less cosmopolitan than consumerist than many other cities
(eg. Bangalore); very few avenues for spending. Avoid the big chains
(Cafe Coffee Day, Kentucky Fried Chicken, Dominos Pizza etc): you'll
have plenty of time to check them out in other Indian cities. The
big weekend activity for a family is going out for dinner: so, check
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active June 25, 2025 15:36
5 entertaining things you can find with the GitHub Search API