Skip to content

Instantly share code, notes, and snippets.

History:
--all searches over the entire repository instead of only in the current branch
- git log --oneline (compressed, one line for commit)
- git log --grep <regex> (searches for commits with the given regex expression in their message)
- git log -Smysearchstring (searches for all the commits that contain any change for mysearchstring in this branch, that is, it looks at
files contents, not to commit messages.)
- git log --pretty=format:"%Cgreen%h %Cred%cn %Cblue%s"
  - git log --pretty=format:"%<|(20) %Cgreen%h %Cred%cn %Cblue%s" (with column)
@ausarenglish
ausarenglish / hashtable-simple.js
Created November 3, 2021 01:49 — forked from dheavy/hashtable-simple.js
Simple Hash Table implemented with separate chaining then open addressing collision strategy
function HashTable() {
this._bucketSize = 23;
this._buckets = [];
this._buckets.length = this._bucketSize;
}
HashTable.prototype.computeHash = function (key) {
var total = 0;
for (var i = 0; i < key.length; i++) {
total += key.charCodeAt(i);