| Type | React | tcomb-react |
|---|---|---|
| array | array | Array |
| boolean | bool | Boolean |
| functions | func | Function |
| numbers | number | Number |
| objects | object | Object |
| strings | string | String |
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
| #!/usr/bin/env bash | |
| curl -sL -o libffmpeg.zip https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.38.1/0.38.1-osx-x64.zip | |
| unzip libffmpeg.zip | |
| mv ./libffmpeg.dylib "/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib" |
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
| // Embedded in this article https://medium.com/p/c98e491015b6 | |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "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
| import React from 'react'; | |
| const MIN_SCALE = 1; | |
| const MAX_SCALE = 4; | |
| const SETTLE_RANGE = 0.001; | |
| const ADDITIONAL_LIMIT = 0.2; | |
| const DOUBLE_TAP_THRESHOLD = 300; | |
| const ANIMATION_SPEED = 0.04; | |
| const RESET_ANIMATION_SPEED = 0.08; | |
| const INITIAL_X = 0; |
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
| for fil in *.jpg; do datepath="$(identify -verbose $fil | grep DateTimeOri | awk '{print $2"-"$3 }' | sed s%:%%g)"; mv -v $fil $datepath.jpg; done |
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
| #!/usr/bin/env bash | |
| # Install luarocks for luaenv. | |
| function install() { | |
| printf "install luarocks for $1..." | |
| local ROOT=`luaenv root` | |
| if [[ $1 == luajit* ]]; then | |
| ./configure --prefix=$ROOT/versions/$1 \ | |
| --with-lua=$ROOT/versions/$1 \ | |
| --rocks-tree=$ROOT/versions/$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
| --[[ | |
| ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php. | |
| Example: | |
| ProFi = require 'ProFi' | |
| ProFi:start() | |
| some_function() | |
| another_function() | |
| coroutine.resume( some_coroutine ) | |
| ProFi:stop() |
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 proxy { | |
| case $1 in | |
| [1-9]*) | |
| export http_proxy=socks5://127.0.0.1:$1 | |
| export https_proxy=$http_proxy | |
| git config --global http.proxy $http_proxy | |
| git config --global https.proxy $https_proxy | |
| ;; | |
| off) |
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
| Write-Output 'Good!' |
git clone https://gist.github.com/fccbf0f02355a31f7959 && cd fccbf0f02355a31f7959 && sh install.sh && cd .. && rm -rf fccbf0f02355a31f7959
git clone https://gist.github.com/fccbf0f02355a31f7959 && cd fccbf0f02355a31f7959 && sh uninstall.sh && cd .. && rm -rf fccbf0f02355a31f7959
NewerOlder