Skip to content

Instantly share code, notes, and snippets.

View sunkibaek's full-sized avatar
💻
Coding

Sunki Baek sunkibaek

💻
Coding
  • Calgary
View GitHub Profile
@sunkibaek
sunkibaek / promise-all-with-timeout.js
Last active December 16, 2017 02:01
Promise all with timeout
const timedPromise = () => {
return new Promise((resolve, reject) => {
console.log('promise1 started');
setTimeout(() => {
resolve('promise1')
}, 3000);
});
}
function update-type {
cd ~/apps/type
git pull
export LAST_TYPE_REPO_HASH="`git rev-parse HEAD`"
echo $LAST_TYPE_REPO_HASH
cd -
npm install --save git+ssh://[email protected]/huiseoul/type.git#$LAST_TYPE_REPO_HASH
}
ffmpeg -i ./filename.mp4 -vf scale=-1:720 -crf 20 -c:a copy filename_720p.mp4
@sunkibaek
sunkibaek / git-cheat-sheet.md
Last active April 26, 2020 22:30
git cheat sheet

설치

macOS

macOS에서는 brew를 이용하여 설치하면 관리가 용이합니다.

brew install git
const simpleCallback = () => {
console.log("== Inside of callback!");
};
const main = (callback) => {
console.log("== Inside of main!");
callback();
};
main(simpleCallback);
const main = (callback) => {
console.log("== Inside of main!");
callback();
};
main(() => {
console.log("== Inside of callback!");
});
// == Inside of main!
const arrowFunction = () => {
console.log("== Inside of arrowFunction!");
};
const regularFunction = function () {
console.log("== Inside of regularFunction!");
};
const main = (firstCallback, secondCallback) => {
console.log("== Inside of main!");