start new:
tmux
start new with session name:
tmux new -s myname
| server { | |
| listen 80; | |
| server_name example.com www.example.com; | |
| if ($http_x_forwarded_proto = "http") { | |
| return 301 https://$server_name$request_uri; | |
| } | |
| ... directives to generate a response | |
| } |
| #!/bin/sh | |
| echo "Clean Services" | |
| echo "Clean User" | |
| dscl localhost -delete /Local/Default/Users/firebird | |
| echo "Clean Group" | |
| dscl localhost -delete /Local/Default/Groups/firebird | |
| if [ -f "/Library/StartupItems/Firebird" ]; then | |
| echo "Remove SuperServer StartupItem" | |
| rm -fr /Library/StartupItems/Firebird | |
| fi |
Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.
They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).
You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.
| rabbitmqctl add_user user password | |
| rabbitmqctl set_user_tags user administrator | |
| rabbitmqctl set_permissions -p / user ".*" ".*" ".*" |
| EMAIL_HOST = 'smtp.yandex.ru' | |
| EMAIL_HOST_USER = 'login@example.com' | |
| EMAIL_HOST_PASSWORD = 'password' | |
| EMAIL_PORT = 465 | |
| EMAIL_USE_TLS = True |
| apt-get install zlib1g-dev | |
| apt-get install g++ | |
| export VENV=$VIRTUAL_ENV | |
| mkdir $VENV/packages && cd $VENV/packages | |
| curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz | |
| curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz | |
| tar xzvf xapian-core-1.0.16.tar.gz |
| # see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
| # core | |
| brew install coreutils | |
| # key commands | |
| brew install binutils | |
| brew install diffutils | |
| brew install ed --default-names | |
| brew install findutils --with-default-names |
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
| LOGGING = { | |
| 'version': 1, | |
| 'disable_existing_loggers': False, | |
| 'handlers': { | |
| 'mail_admins': { | |
| 'level': 'ERROR', | |
| 'class': 'django.utils.log.AdminEmailHandler' | |
| }, | |
| 'null': { | |
| 'level':'DEBUG', |