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/bash | |
| echo "SET autocommit=0; | |
| SET unique_checks=0; | |
| SET foreign_key_checks=0;" > backup.sql | |
| mysqldump -u myuser --password=mypassword mydatabase >> backup.sql | |
| echo "COMMIT;" >> backup.sql |
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 ruby | |
| # | |
| # Passenger management script | |
| # By James Smith http://loopj.com | |
| # Based heavily on a similar script by Jon Bettcher | |
| # | |
| # Check memory usage of all paseenger child process and kill if grows | |
| # too large. | |
| # |
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
| // Extract "GET" parameters from a JS include querystring | |
| function getParams(script_name) { | |
| // Find all script tags | |
| var scripts = document.getElementsByTagName("script"); | |
| // Look through them trying to find ourselves | |
| for(var i=0; i<scripts.length; i++) { | |
| if(scripts[i].src.indexOf("/" + script_name) > -1) { | |
| // Get an array of key=value strings of params | |
| var pa = scripts[i].src.split("?").pop().split("&"); |
NewerOlder