Skip to content

Instantly share code, notes, and snippets.

if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
@ShaneQi
ShaneQi / add_swap.sh
Last active June 19, 2017 04:17
add swap for ubuntu 1604
free -h
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
var date1 = new Date()
var date2 = new Date(2016, 10, 6); // Date(2016, 10, 6) is Nov. 6, 2016
var data1_ms = date1.getTime();
var data2_ms = date2.getTime();
// Then, calculate the milliseconds difference between the two dates.
var difference_ms = date2_ms - date1_ms;
// Finally, convert the difference back to days in which we should
// divide the milliseconds by one day’s milliseconds:
### Keybase proof
I hereby claim:
* I am shaneqi on github.
* I am shaneqi (https://keybase.io/shaneqi) on keybase.
* I have a public key whose fingerprint is B475 5105 CD5D 9A51 670D 4986 6C74 57BA 133E 4636
To claim this, I am signing this object: