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
$ ffmpeg -i movie.mp4 -ss 00:00:05 -t 00:01:00 -async 1 cut.mp4 | |
# -ss = start time | |
# -t = duration, not end time |
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
// run this in Chrome with the --enable-precise-memory-info flag | |
// $ open -a "Google Chrome" --args --enable-precise-memory-info | |
timer = function() { | |
requestAnimationFrame(timer) | |
var heapBefore = window.performance.memory.usedJSHeapSize | |
// run processes here | |
// eg. console.log allocates 2216 bytes, new Object() 56 bytes |
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
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
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
$ ll | |
$ sudo chown -R hub_bot:www-data . | |
$ sudo chmod -R 755 . |
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
# open global git config | |
$ atom ~/.gitconfig | |
[alias] | |
today = !git log --since=midnight --author=\"$(git config user.name)\" --oneline | |
yday = !git log --since=day.before.yesterday.midnight --until=midnight --author=\"$(git config user.name)\" --oneline | |
co = !git checkout | |
pu = !git push -u | |
ci = !git commit -am |
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
$ du -h -d 1 ./ |
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
# view all processes | |
ps -ax | |
# filter processes | |
ps -ax | grep <process-name> | |
# kill process | |
kill <process-PID> |
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
# list aliases | |
alias | |
# add alias | |
alias name='command' | |
# remove alias | |
unalias name |
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
class Klass { | |
constructor() { | |
console.log('hello class!') | |
} | |
static util(a, b) { | |
return a + b | |
} | |
render() { |
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
// TODO |