brew install lxc
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
## Node.js | |
node () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -w /usr/src/app --rm node:4 node $@; } | |
npm () { docker run -it -u $(id -u) -v "$PWD":/usr/src/app -v $HOME/.npm:/.npm -w /usr/src/app --rm node:4 npm $@; } |
Setup
npm install -g cordova
cordova config set -g telemetry false
cordova create my-app && cd my-app
JAVA_HOME=`/usr/libexec/java_home -v 1.8` cordova requirements android
cordova platform add android
cordova build android
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
#!/bin/bash | |
# grep -sinE $1 --color -R ./* > $2; wc -l $2; | |
TEXT=$1 | |
FILE=$2 | |
grep -sinE $TEXT -R ./* | awk -F":" '{ print "name: "$1"\nline: "$2"\ncontent "$3"\ninfo: \""; system("stat -nf\"%z, %B %m\" "$1); print "\"\n"}' > $FILE; | |
grep "name: " $FILE | wc -l; |
If you accidently remove any host from known_hosts you can restore them by following command:
ssh-keyscan -H HOSTNAME >> ~/.ssh/known_hosts
LOGICAL AND - a ∧ b
(a && b
) - is true if A and B are both true; else it is false.
LOGICAL OR - a ∨ b
(a || b
) - is true if A or B (or both) are true; if both are false, the statement is false.
LOGICAL XOR - a ⊕ b
(a != b
) - is true when either A or B, but not both, are true.
EQUIVALENCE - a ↔ b
(a == b
) - means A is true if B is true and A is false if B is false
LOGICAL NOT - ¬a
(!a
) - is true if and only if A is false.