Skip to content

Instantly share code, notes, and snippets.

@ivansoban
ivansoban / keybase.md
Created May 4, 2019 18:20
keybase proof

Keybase proof

I hereby claim:

  • I am ivansoban on github.
  • I am ivansoban (https://keybase.io/ivansoban) on keybase.
  • I have a public key ASC6gZkfNFGMCOQGkPFK28vTzGWe6J91r6bFdfs-CJyQmQo

To claim this, I am signing this object:

Bash (Readline)

Moving

ctrl + a                 Goto BEGINNING of command line
ctrl + e                 Goto END of command line
ctrl + b                 move back one character
ctrl + f                 move forward one character

alt + f move cursor FORWARD one word

@ivansoban
ivansoban / freqword.js
Last active December 19, 2015 23:28
Returns most frequent word in a sentence.
function freqword(sentence) {
'use strict';
var words = [],
i,
lastGoodIndex = 0,
mostCommon,
mostCommonCount = 1,
counter = 0,
curWord;