This file contains 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 | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/deploy-key | |
cd /sample/path/to/app | |
git pull origin master |
This file contains 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
http_port 8080 | |
hierarchy_stoplist cgi-bin ? | |
acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php | |
acl localnet src 192.168.0.0/16 | |
acl localhost src 127.0.0.1/32 | |
acl SSL_ports port 443 |
This file contains 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
from flask import session | |
from flask import request | |
from flask import redirect | |
from functools import wraps | |
app = Flask(__name__) | |
app.secret_key = '86A611287CE4DC76545575687F84F' | |
def login_required(test): |
This file contains 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
# Setup Logging | |
formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') | |
fh = logging.FileHandler(filename='flask-tutorial.log') | |
fh.setFormatter(formatter) | |
fh.setLevel(logging.DEBUG) | |
app.logger.addHandler(fh) |
This file contains 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
apt-get -y update | |
# Download Zulip | |
cd /root | |
wget https://www.zulip.com/dist/releases/zulip-server-1.3.6.tar.gz | |
echo "665a1e6ef840b3a86cc18946429ad1c0033d27a2 zulip-server-1.3.6.tar.gz" | sha1sum -c | |
tar -xf zulip-server-1.3.6.tar.gz | |
mv zulip-server-1.3.6 zulip | |
# Install SSL Certs |
This file contains 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
sudo apt-get -y update | |
sudo apt-get -y install git | |
sudo add-apt-repository -y ppa:chris-lea/node.js | |
sudo apt-get -y update && sudo apt-get install -y nodejs | |
sudo apt-get -y install mongodb | |
curl https://install.meteor.com/ | sh | |
git clone https://github.com/RocketChat/Rocket.Chat.git | |
cd Rocket.Chat |
This file contains 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
set nocompatible | |
" Syntax Highlighting | |
filetype indent plugin on | |
set syntax=on | |
" Use case insesitive search | |
set ignorecase | |
set smartcase |
This file contains 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
location /testapp/ { | |
rewrite ^/testapp/(.*) /$1 break; | |
proxy_redirect off; | |
proxy_pass http://127.0.0.1:9090; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
} |
This file contains 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 | |
set -e | |
# ---------------------------------------------------------------------------------------- | |
# Installs OpenCV 2.4.11 | |
# Note: Tested on Ubuntu 14.04 | |
# | |
# Resources: | |
# | |
# http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/ |
This file contains 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 GDAL python libraries on Virtualenv. Tested in Ubuntu 14.04 | |
sudo apt-get install gdal-bin | |
sudo apt-get install libgdal-dev libgdal1h | |
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal" |
OlderNewer