Skip to content

Instantly share code, notes, and snippets.

View JoshuaEstes's full-sized avatar
👨‍💻

Joshua Estes JoshuaEstes

👨‍💻
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@wojteklu
wojteklu / clean_code.md
Last active April 19, 2024 10:15
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@wbsch
wbsch / on-exit_git.py
Last active November 16, 2020 15:33
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
#!/usr/bin/env python
#
# PoC: Manage a git repository in ~/.task that gets updated on changes.
# Only pending.data and completed.data are included by default.
# You can use "git add" to add whatever files you want to track in your
# task folder.
#
# Inspired by https://gist.github.com/Unode/9366218
#
# Works with any Taskwarrior version that supports hooks.
@JoshuaEstes
JoshuaEstes / Vagrant.rst
Last active August 29, 2015 14:08
Useful Oneliners

Vagrant

# Gettting the state of the machine, ie Is it poweroff or running

vagrant status --machine-readable | awk -F',' '$3 == "state" { print $4 }'

Can be used in a script like so

@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 22, 2024 08:52
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@martindale
martindale / README.md
Last active August 29, 2015 14:03
README.md Template

Getting Started

Overview

One or two paragraph introduction on the objective of this library.

Quick Start

If you are unsure of our project and just want to play around, you can get things set up quickly by:

@JoshuaEstes
JoshuaEstes / 00-README.markdown
Last active August 29, 2015 14:00
My goto files for when I initialize a new symfony2 project. It includes bash scripts, composer.json files and a few other things.

README

These are the default files that I will usually start with when setting up a symfony2 project to use vagrant and puppet. I'm putting this readme file here for future updates.

Usage

Make sure the files that end in .sh are executable.

@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@nfedyashev
nfedyashev / master.sh
Created June 13, 2013 00:47
Continuous deployment script
# Disable NewRelic pinging
curl https://heroku.newrelic.com/accounts/xxxxx/applications/yyyyyyyy/ping_targets/disable -X POST -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
heroku maintenance:on --app yourapp-staging
heroku pg:reset DATABASE --confirm yourapp-staging --app yourapp-staging
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app yourapp-production` --app yourapp-staging --confirm yourapp-staging
git remote add heroku_yourapp-staging git@heroku.com:yourapp-staging.git
git push heroku_yourapp-staging $COMMIT_ID:master -f
heroku_run 'rake db:migrate' yourapp-staging
heroku restart --app yourapp-staging
heroku maintenance:off --app yourapp-staging
@beberlei
beberlei / CommandMethodMapper.php
Created November 24, 2012 23:51
Symfony Form DataMapper that uses a command method to write data back on object
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/