Skip to content

Instantly share code, notes, and snippets.

@sheki
sheki / commit.md
Last active April 21, 2026 21:09
How to write a commit message

Git Commit Message Instructions

Write each commit as a small, coherent change. If it is hard to summarize cleanly, the commit may be doing too much.

Start with a short subject line that summarizes the change. If the change is simple enough, the subject alone can be the full message.

When the change needs explanation, add a blank line after the subject and then write a body. Git tools treat the text before the first blank line as the title, so keeping the subject separate matters.

Write the subject as an instruction, using imperative mood. Think "Add support for X", "Remove deprecated code", or "Refactor parser", not "Added", "Removing", or "More fixes".

# Git Commit Message Instructions
Write each commit as a small, coherent change. If it is hard to summarize cleanly, the commit may be doing too much.
Start with a short subject line that summarizes the change. If the change is simple enough, the subject alone can be the full message.
When the change needs explanation, add a blank line after the subject and then write a body. Git tools treat the text before the first blank line as the title, so keeping the subject separate matters.
Write the subject as an instruction, using imperative mood. Think "Add support for X", "Remove deprecated code", or "Refactor parser", not "Added", "Removing", or "More fixes".
@sheki
sheki / sudoku.go
Created January 28, 2019 02:38
Norvig_sudoku
package main
import (
"fmt"
"log"
"sort"
"strings"
)
func cross(a []string, b []string) []string {
Hey
Just checking in about this ?
On 1/7/19 2:36 PM, Abhishek Kona wrote:
>
> I just reset greenkeeper
@sheki
sheki / recurse_http_store.go
Created November 3, 2018 23:35
Solution for a recurse center problem
package main
import (
"errors"
"fmt"
"log"
"net/http"
"sync"
)
declare module "react-loadable" {
declare type LoadingProps = {
isLoading: boolean,
pastDelay: boolean,
timedOut: boolean,
retry: () => void,
error: ?Error,
};
declare type CommonOptions = {
/*
histogram [1,1,1,5] ==
*
*
* *
==========
0123456789
histogram [1,4,5,4,6,6,3,4,2,4,9] ==
*
@sheki
sheki / active_record_block.rb
Last active April 5, 2018 19:57
approximate.rb
class SuperActiveRecord < ActiveRecord
instance_methods.each |name| do .# not exact syntaxa
### IF THIS IS NOT POSSBILE override 10 most use actie record methods like
### new/find/where/find_by/update so on and so forth
original_method = instance_method(name)
define_method(name) do |*args|
check_if_allowed()
original_method.bind(self).call(*args)[[[[
@sheki
sheki / woot woot
Created March 29, 2018 22:07
sheki_zig.txt
ABCDEFGHIJ, 3
A E I
BDFHJ
C G
ABCDEFGHIJKLMNOPQ, 4
A G M
B FH LN
@sheki
sheki / 94114.json
Created March 7, 2018 21:41
geojson_responses.json
{
"results" : [
{
"address_components" : [
{
"long_name" : "94114",
"short_name" : "94114",
"types" : [ "postal_code" ]
},
{