#Python virtual env / Django OS X
Install virtualenv/virtualenvwrapper
pip install virtualenv
pip install virtualenvwrapper
Add the following to your .zshrc/bashrc
#!/bin/zsh | |
for f in **/*(.) | |
do | |
EXTENSION="${f##*.}" | |
CURRENT_NAME="${f%.*}" | |
NEW_NAME="${CURRENT_NAME}_${RANDOM}.$EXTENSION" | |
echo "Rename $f to $NEW_NAME" | |
# mv "$f" "$NEW_NAME" | |
done |
git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --author "John" | grep 'Sat\|Sun' |
#!/bin/sh | |
pass=true | |
RED='\033[1;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
echo "Running Linters:" | |
# Run tslint and get the output and return code | |
tslint=$(npm run lint) | |
ret_code=$? | |
# If it didn't pass, announce it failed and print the output |
const validatePassword = (pw: string) => { | |
const minimumLength = 5; | |
const amountOfCriteria = 1; | |
const isLongEnough = (pw: string) => pw.length >= minimumLength; | |
const containsDigit = (pw: string) => ( | |
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
.some(n => pw.includes(String(n))) | |
); |
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '{"pattern":"https://[*.]my.domain:8090","filter":{"ISSUER":{"CN":"example.com"}}}' |
#Python virtual env / Django OS X
Install virtualenv/virtualenvwrapper
pip install virtualenv
pip install virtualenvwrapper
Add the following to your .zshrc/bashrc
I hereby claim:
To claim this, I am signing this object:
objects
that implement map
are functors. So, Array
is a functor, and Array.filter
is a higher order function
abstract
a functor is an object which acts as a container for a value, which then allows you to APPLY one or more functions to that value, and returns a new functor (in case of .map()
, an Array
) containing the transformed value.
/usr/libexec/java_home -v 1.7.0_45 --exec javac -version # http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html |
find . -type f -name "*.java" | xargs vim +"argdo set bomb | set fileencoding=utf-8 | w" | |
find . -type f -name "*.java" | xargs vim +"argdo set fileencoding=utf-8 | w" |