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
from sys import argv | |
import requests | |
import csv | |
from time import sleep | |
# https://gist.github.com/jbradach/8381802 | |
def main(): | |
script, filein, fileout = argv |
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
{ | |
"auto_complete": true, | |
"auto_indent": true, | |
"auto_match_enabled": false, | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 1, | |
"caret_style": "solid", | |
"color_scheme": "Packages/User/Monokai Extended (SL).tmTheme", |
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
@app.route('/uwsgistat/') | |
@app.route('/uwsgistat/<appchoice>') | |
def uwsgistat(appchoice = None): | |
if appchoice == None: | |
return redirect(url_for('index')) | |
statsocket = '/tmp/' + appchoice + '-stat.sock' | |
if os.path.exists(statsocket): | |
client = socket.socket( socket.AF_UNIX, socket.SOCK_STREAM ) | |
client.connect(statsocket) | |
data = client.recv(2048) |
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
location /yourlocation { | |
alias /usr/share/phpmyadmin; | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm-ssl.sock; | |
fastcgi_index index.php; | |
} | |
} |
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
server { | |
listen 80; | |
server_name $hostname; | |
root /srv/www/$hostname/myapp; | |
location = /favicon.ico { | |
alias /srv/www/$hostname/public_html/favicon.ico; | |
access_log off; | |
log_not_found off; | |
} |
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
upstream uwsgi_host { | |
server unix:/tmp/flaskapp.sock; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
location ^~ /static/ { | |
alias /srv/www/flaskapp/app/static; |
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 | |
### BEGIN INIT INFO | |
# Provides: redmine | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts redmine with puma | |
# Description: Starts redmine from /home/redmine/redmine. | |
### END INIT INFO |
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 puma | |
# https://gist.github.com/jbradach/6ee5842e5e2543d59adb | |
# start puma with: | |
# RAILS_ENV=production bundle exec puma -C ./config/puma.rb | |
application_path = '/home/redmine/redmine' | |
directory application_path | |
environment 'production' |
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
# https://gist.github.com/jbradach/31ad6d9c84c3be3b5730 | |
upstream puma_redmine { | |
server unix:/home/redmine/redmine/tmp/sockets/redmine.sock fail_timeout=0; | |
#server 127.0.0.1:3000; | |
} | |
server { | |
server_name YOUR.SERVER.NAME; | |
listen 80; |
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
# https://gist.github.com/jbradach/e0da911b02cd2c3fbd8b | |
server { | |
listen [::]:80; | |
listen 80; | |
server_name rudeotter.foo www.rudeotter.foo; | |
return 301 https://rudeotter.foo$request_uri; | |
} |
OlderNewer