Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ferhaterata's full-sized avatar
:octocat:

Ferhat Erata ferhaterata

:octocat:
View GitHub Profile
// Primitive hash function that for a string returns a positive 32 bit int
// Do not use in production, use murmur3 or fnv1
// You can improve this by changing 5 to 31
Object.defineProperty(String.prototype, 'hashCode', {
value: function() {
var hash = 0, i, chr;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ferhaterata
ferhaterata / ideavim_actionlist.txt
Last active December 13, 2021 05:23 — forked from aca/ideavim_actionlist.md
IdeaVim ActionList
--- Actions ---
$Copy <C-C> <C-Ins>
$Cut <C-X> <S-Del>
$Delete <Del>
$LRU
$Paste <C-V> <S-Ins>
$Redo <C-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <C-A>
$Undo <C-Z> <A-BS>
@ferhaterata
ferhaterata / doom.txt
Created March 21, 2020 11:19 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@ferhaterata
ferhaterata / spacemacs-cheatsheet.txt
Last active March 18, 2020 03:39 — forked from k3yavi/spacemacs-cheatsheet.txt
Spacemacs cheatsheet
Useful Spacemacs commands
SPC q q - quit
SPC w / - split window vertically
SPC w - - split window horizontally
SPC w = - balance split windows
SPC 1 - switch to window 1
SPC 2 - switch to window jkk2
SPC w c - close current window
SPC w d - delete current window