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
cgi.fix_pathinfo = 0; | |
realpath_cache_size = 256k; | |
realpath_cache_ttl = 300; | |
max_execution_time = 120; | |
max_input_time = 120; | |
memory_limit = 192M; | |
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT | |
post_max_size = 30M | |
upload_max_filesize = 30M | |
date.timezone = Australia/Sydney |
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
description "Run a persistent rtorrent within screen" | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
stop on runlevel [!2345] | |
env LANG=en_US.utf8 | |
env HOME=/home/ubuntu | |
setuid ubuntu | |
setgid 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
# btsync - Bittorent Sync | |
description "btsync - Keep Bittorent Sync running" | |
start on filesystem | |
stop on shutdown | |
respawn | |
expect fork | |
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 | |
#Bridge config | |
#for f in /proc/sys/net/bridge/bridge-nf-*; do echo 0 > $f; done | |
#Flush all before applying new rules | |
iptables -F | |
iptables -t nat -F | |
iptables -t mangle -F | |
iptables -X |
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 | |
# | |
# A script to fix file permissions in the given | |
# files directory for drupal | |
# | |
# Usage: | |
# - set files directory variable to point at the files | |
# drupal installation files directory | |
# - run script |
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
#!/usr/bin/env bash | |
# split strings | |
GIT_BRANCH="origin/master" | |
remote=`echo $GIT_BRANCH | cut -d '/' -f 1` | |
branch=`echo $GIT_BRANCH | cut -d '/' -f 2` | |
# finding working directory of a process (where $$ is the PID, obtained through `pgrep` or other) | |
pwdx $$ | |
# or |
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
## WARNING: THIS IS CURRENTLY NOT WORKING BECAUSE SELENIUM DOES NOT HAVE | |
## A DISPLAY IN WHICH TO LAUNCH | |
description "Selenium Server Standalone" | |
author "Yusuf" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
#Respawn the process if it crashes |
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
<!-- taken from http://stackoverflow.com/a/12121309/351590 --> | |
<div class="wrapper"> | |
<div class="main"> | |
This is your div with the specified aspect ratio. | |
</div> | |
</div> | |
<style> | |
.wrapper { | |
width: 50%; | |
/* whatever width you want */ |
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
description "Turn `project name` bot into a daemon" | |
author "Yusuf Hasan Miyan" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
script | |
echo $$ > /var/run/project-name-bot.pid | |
chdir /path/to/project-name-bot | |
exec sudo -u $user /usr/bin/npm start |
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
mysql -uroot -ppassw0rd --execute "CREATE DATABASE <db_name>;" |