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
$('select').prop('selectedIndex',1); |
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 | |
# Written by Shoaib Ali [email protected] | |
# Paid by your tax money | |
# This script watches a site for changes by creating a md5 hash of it, if that hash changes means site/url is changed | |
# then it sends a notification via twitter. see twitter.sh | |
status="" | |
url=$1 | |
keyword=$2 | |
original_hash=`curl -s --compress --user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.0 Safari/537.36" $url | openssl md5 | cut -d' ' -f2` |
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
parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
parse_git_tag () { | |
git describe --tags 2> /dev/null | |
} | |
parse_git_branch_or_tag() { | |
local OUT="$(parse_git_branch)" |
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
mailq|fgrep [email protected]|sed 's/\*.*//' | awk '{print $1}' | postsuper -d - |
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
/* This is a quick jquery hack to click all the Delete action on SilverStripe GridField. Need topen up Console in browser using F12 and paste this in */ | |
jQuery("[title=Delete]").each(function() { jQuery(this).click(); }); |
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
Just put this in the .htaccess or apache2 configuration virtual host entry, just below alias /simplesaml | |
RewriteCond %{HTTP_USER_AGENT} ms-office [NC] | |
RewriteRule ^/(.*) $1 [R=301,L,QSA] | |
RewriteCond %{HTTP_USER_AGENT} OfficeLiveConnector [NC] | |
RewriteRule ^/(.*) $1 [R=301,L,QSA] |
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 | |
# Simple script to backup MySQL databases | |
# Parent backup directory | |
backup_parent_dir="/var/backups/mysql" | |
# MySQL settings | |
mysql_user="root" | |
mysql_password="******" |
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
# Disclaimer - Please don't just execute it blindly, this was ran on Ubuntu 14.04.2 LTS | |
# I am not responsible for whatever harm this shell script may cause. | |
# Look at the wget requests in the shell script to make sure you are putting in configuration | |
# files as they should be. | |
# Many commands are run as sudo and permissions are changed to www-data etc | |
# The existing user whose running this shell script also becomes part of www-data user group | |
# Files downlaoded for this shell script to work - example configuration files | |
# 1. nginx default sites-available config | |
# 2. php5-fpm to listen on 9000 |
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
fastcgi_buffers 16 16k; | |
fastcgi_buffer_size 32k; | |
server { | |
listen 80; | |
listen 127.0.0.1:443 ssl; | |
root /sites/deploynaut/www; | |
server_name mgmt 127.0.0.1; |
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
; Start a new pool named 'www'. | |
; the variable $pool can we used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[www] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'slowlog' | |
; - 'listen' (unixsocket) | |
; - 'chroot' |
OlderNewer