Skip to content

Instantly share code, notes, and snippets.

View deepak's full-sized avatar

Deepak Kannan deepak

View GitHub Profile
@jewelia
jewelia / gist:595200aae5f9a437a634
Last active August 29, 2015 14:12
Books: 2014 retrospective and to-read for 2015

Many of my friends have shared their reading lists of all the books they read in 2014 (thank you!) -- this gave me some excellent ideas of books to read for 2015.

So I have decided to share my reading list as well, and the list of books I plan to read in 2015. If you have any ideas for additional books, I'd love them (especially in the topic areas of business, finance, nonfiction).

Favorite books I read in 2014:

  • The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers by Ben Horowitz
  • The Everything Store: Jeff Bezos and the Age of Amazon by Brad Stone
  • The Effective Executive: The Definitive Guide to Getting the Right Things Done by Peter F Drucker
  • Zero to One: Notes on Startups, or How to Build the Future by Peter Thiel
@dgraham
dgraham / fetch.js
Last active March 24, 2023 15:44
Simple window.fetch wrapper.
(function() {
function status(response) {
if (response.ok) {
return response
} else {
var error = new Error(response.statusText || response.status)
error.response = response
throw error
}
}
@Globegitter
Globegitter / es.sh
Last active November 18, 2020 12:52
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@jodosha
jodosha / 00_tldr.md
Created August 6, 2014 16:33
Lotus w/ Rack::Protection

Lotus

Router                 (router.ru)                 7036.45 req/s
Action                 (action.ru)                 6225.49 req/s
Tiny                   (tiny.ru)                   6631.06 req/s
Tiny Action            (tiny_action.ru)            4948.72 req/s
View                   (view.ru)                   4310.54 req/s
Template               (template.ru)               4175.52 req/s
Template Interpolation (template_interpolation.ru) 4075.00 req/s

There's no general rule you can follow here, because it's always going to depend on context. In my experience the kind of feedback loops you create, and the kind of safety nets you need are defined entirely by the domain, the organization, and the team culture.

Here are a few examples:

  1. I do a bit of work for a medium-sized dental clinic. The business manager there is really fun to work with, but has the tendency of changing his mind six times before he settles his ideas. So when he asks for a report, I don't put any effort at all into writing tests or worrying about minor bugs even, because my only goal is to flesh out in code something vaguely resembling what he asked for.

Often times, this means doing a handful of 30 minute prototypes until the requirements settle, each of which would have taken me 2 hours if I drove them via TDD. When things finally cool down, I evaluate the complexity and maintainability of the resulting code and either leave it untested, add some acceptance tests, backfill unit tes

#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use Lingua::EN::Fathom;
use TeX::Hyphen;
use List::Util qw(min);
@dergachev
dergachev / backup-services.md
Last active October 12, 2023 06:14
Results of my backup services research

backup services research

I googled around, especially with site:news.ycombinator.com for backup recommendations. Here are notes on the top hits.

tarsnap

http://www.tarsnap.com/

  • by prolific HN member; focus on encryption and deduplication
@myronmarston
myronmarston / explanation.md
Last active October 22, 2020 18:16
Explanation for why `its` will be removed from rspec-3

its isn't core to RSpec. One the of the focuses of RSpec is on the documentation aspects of tests. Unfortunately, its often leads to documentation output that is essentially lies. Consider this spec:

User = Struct.new(:name, :email)

describe User do
  subject { User.new("bob") }
  its(:name) { should == "bob" }
end
require "readline"
require "pry"
require "fileutils"
class CompileObjectiveC
attr_accessor :code_lines
TMP_DIR = "/tmp"
def initialize
@chrishunt
chrishunt / employee.rb
Created October 13, 2012 17:50
Relations in Ruby
require 'relations'
class Employee
extend Relations
belongs_to :manager
end