brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/
is a symlink to /usr/local/Cellar/redis/x.y.z
(e.g., 2.8.7
)
# Copyright (c) 2012, Vehbi Sinan Tunalioglu <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# - Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# |
# Extension of http://www.yilmazhuseyin.com/blog/dev/create-thumbnails-imagefield-django/ | |
# Note: image_folder and thumbnail_folder are both a callable (ie. a lambda that does a '/'.join()) | |
class Image(Media): | |
image = models.ImageField( | |
upload_to=image_folder | |
) | |
thumbnail = models.ImageField( |
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
Internal of prototype and inheritance(chinese)
https://imazole.wordpress.com/2013/12/23/javascript-prototype-chain/
https://www.byvoid.com/blog/javascript-object-prototype
_
and $
can be used to name a variable or function as first letter. Digits can not be first letter for naming variable or function.