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
<?php | |
$databases = array ( | |
'default' => | |
array ( | |
'default' => | |
array ( | |
'database' => $_SERVER['RDS_DB_NAME'], | |
'username' => $_SERVER['RDS_USERNAME'], | |
'password' => $_SERVER['RDS_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
#!/bin/bash | |
function navigateRecursively { | |
currentDirectory=$1 | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
BASEPATH=$2 | |
i=0 | |
#echo $currentDirectory |
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 | |
# | |
# Original for 5.3 by Ruben Barkow (rubo77) http://www.entikey.z11.de/ | |
# release 1 PHP5.4 to 5.3 by Emil Terziev ( foxy ) Bulgaria | |
# Originally Posted by Bachstelze http://ubuntuforums.org/showthread.php?p=9080474#post9080474 | |
# OK, here's how to do the Apt magic to get PHP packages from the precise repositories: | |
echo "Am I root? " | |
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then |
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/sh | |
DESC="Jenkins CI Server" | |
NAME=jenkins | |
RUN_AS=jenkins | |
HTTP_PORT=8281 | |
LOGFILE=/var/log/jenkins.log | |
COMMAND="nohup /usr/bin/java -Dsvnkit.http.sslProtocols=\"SSLv3\" -jar /home/jenkins/jenkins.war --httpPort=$HTTP_PORT > $LOGFILE 2>&1 &" | |
d_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
#!/bin/bash | |
# | |
# WANdisco Subversion install script. | |
# Copyright (C) 2013 WANdisco plc | |
# | |
# Please contact opensource@wandisco.com if you have any problems with this | |
# script. | |
set -e |
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
# Accompanies this blog post: | |
# http://www.seomoz.org/blog/htaccess-file-snippets-for-seos | |
# NOTE: This file isn't designed to be used all together, some of the rules will conflict, | |
# it is meant more as a copy and paste board. | |
# IMPORTANT: Make sure you test .htaccess changes thoroughly, as it can be easy to make mistakes | |
# and then you end up in a bad place! | |
RewriteEngine On |
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
function interval(func, wait, times){ | |
var interv = function(w, t){ | |
return function(){ | |
if(typeof t === "undefined" || t-- > 0){ | |
setTimeout(interv, w); | |
try{ | |
func.call(null); | |
} | |
catch(e){ | |
t = 0; |
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/sh | |
git_repo=$1 | |
[ -z "$git_repo" ] && git_repo="." | |
cd $git_repo > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
printf "Invalid directory path.\n" | |
exit 1 | |
fi |
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
json_string.replace(/(\s*?{\s*?|\s*?,\s*?)(['"])?([a-zA-Z0-9]+)(['"])?:/g, '$1"$3":'); | |
eval('var json = new Object(' + json_string + ')'); |
OlderNewer