macOS에서는 brew를 이용하여 설치하면 관리가 용이합니다.
brew install git| const arrowFunction = () => { | |
| console.log("== Inside of arrowFunction!"); | |
| }; | |
| const regularFunction = function () { | |
| console.log("== Inside of regularFunction!"); | |
| }; | |
| const main = (firstCallback, secondCallback) => { | |
| console.log("== Inside of main!"); |
| const main = (callback) => { | |
| console.log("== Inside of main!"); | |
| callback(); | |
| }; | |
| main(() => { | |
| console.log("== Inside of callback!"); | |
| }); | |
| // == Inside of main! |
| const simpleCallback = () => { | |
| console.log("== Inside of callback!"); | |
| }; | |
| const main = (callback) => { | |
| console.log("== Inside of main!"); | |
| callback(); | |
| }; | |
| main(simpleCallback); |
macOS에서는 brew를 이용하여 설치하면 관리가 용이합니다.
brew install git| ffmpeg -i ./filename.mp4 -vf scale=-1:720 -crf 20 -c:a copy filename_720p.mp4 |
| 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://git@github.com/huiseoul/type.git#$LAST_TYPE_REPO_HASH | |
| } |
| const timedPromise = () => { | |
| return new Promise((resolve, reject) => { | |
| console.log('promise1 started'); | |
| setTimeout(() => { | |
| resolve('promise1') | |
| }, 3000); | |
| }); | |
| } |
| @import url(http://fonts.googleapis.com/earlyaccess/notosanskr.css); | |
| $black: rgba(0, 0, 0, .87); | |
| html { | |
| color: $black; | |
| font-family: "Noto Sans KR", sans-serif; | |
| font-weight: normal; | |
| line-height: 1.5; | |
| } |
| class NullDateTime | |
| def in_time_zone(_city = 'DefaultTimeZoneCity') | |
| self | |
| end | |
| def to_s(_format = :default_date_time) | |
| '' | |
| end | |
| end |
| def anagram?(string, candidate) | |
| string.chars.sort == candidate.chars.sort | |
| end | |
| require 'minitest/autorun' | |
| class Test < MiniTest::Test | |
| def test_anagram | |
| assert anagram?('beta', 'bate') | |
| assert anagram?('beta', 'beat') |