This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo launchctl stop com.apple.audio.coreaudiod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========== OBJECTS ================== | |
// the most used | |
const {x} = {x: 1}; // x === 1 | |
getSuggestions (request) { | |
const { prefix, bufferPosition, editor } = request; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getColor(someString) { | |
// simple stupid hash func, beware of Number.MAX_VALUE => Infinity => Nan :) alsow its slow | |
const hash = parseInt(Array.from(someString, char => char.charCodeAt(0)).join('')); | |
const hue = hash%360; | |
const saturation = seededRand(hue, 13, 28); | |
const lightness = seededRand(hue, 65, 72); | |
return `hsla(${hue}, ${saturation}%, ${lightness}%, 1)`; | |
} | |
function seededRand(seed, min, max) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomWithStep(min, max, step) { | |
let prev; | |
return function () { | |
let current; | |
function countFormula() { | |
current = min + (step * Math.floor(Math.random()*(max-min)/step)); | |
} | |
do { | |
countFormula(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
me | |
me@ | |
[alias] | |
st = status -s -b | |
oneline = "!f () { git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-80s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R; }; f" | |
lg = log --graph --pretty=tformat:'%C(red)%h - %C(blue)%an %C(reset)%s %C(green)(%ci) %C(bold green)%d' | |
logsvn = log --pretty=tformat:'%C(red)%h - %C(reset)%s %C(blue)%an %C(green)(%cr)%n%C(bold green)%b' | |
gg = grep -En --break --heading |