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
| # Install Xcode | |
| xcode-select --install | |
| # Install Homebrew. | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew doctor | |
| brew update | |
| # Install git. | |
| brew install git |
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
| building '_imagingft' extension | |
| gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protecto | |
| r --param=ssp-buffer-size=4 -fPIC -I/usr/include/freetype2 -IlibImaging -I/home/cafeerp/instances/cafeerp_ocb7/include -I/usr/local/include -I/usr/include -I/usr/include/python2.7 - | |
| c _imagingft.c -o build/temp.linux-x86_64-2.7/_imagingft.o | |
| _imagingft.c:73:31: fatal error: freetype/fterrors.h: No such file or directory | |
| #include <freetype/fterrors.h> |
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 | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.
brew install httpie
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
| class ValidateModelMixin(object): | |
| """Make :meth:`save` call :meth:`full_clean`. | |
| .. warning: | |
| This should be the left-most mixin/super-class of a model. | |
| Do you think Django models ``save`` method will validate all fields | |
| (i.e. call ``full_clean``) before saving or any time at all? Wrong! |
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/sh | |
| version="1.4.15" | |
| priority="10415" | |
| libevent="/usr/local/libevent/2.0.20-stable/" | |
| supervisordir="/etc/supervisord.d" | |
| # create user | |
| sudo groupadd memcached | |
| sudo useradd -r -g memcached -s /sbin/nologin -M -d /var/run/memcached memcached |


