Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
[alias] | |
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
# For Windows | |
alias subl='/c/Program\ Files/Sublime\ Text\ 3/subl.exe' |
function asyncFunc(e) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(e), e * 1000); | |
}); | |
} | |
const arr = [1, 2, 3]; | |
co(function* () { | |
let result = []; |
for a in *.flac; do | |
ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}" | |
done |
function asyncFunc(e) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(e), e * 1000); | |
}); | |
} | |
const arr = [1, 2, 3]; | |
function workMyCollection(arr, results = []) { | |
return new Promise((resolve, reject) => { |
/* | |
* func - function to be called | |
* threshold - time period in milliseconds | |
* N - how many function calls will be allowed to execute | |
*/ | |
var debounceN = function(func, threshold, N) { | |
var counter = 0; | |
return function f() { |
/* | |
* func - function you want to debounce | |
* wait - time period in milliseconds | |
* immediate - boolean if you want to execute function right away | |
*/ | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { |