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 | |
# Make sure only root can run our script | |
FILE="/tmp/out.$$" | |
GREP="/bin/grep" | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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
<?php | |
//Env Config | |
error_reporting(E_ALL); | |
ini_set('display_errors',1); | |
//disable output buffering. | |
while (ob_get_level()) ob_end_flush(); | |
//Ensure this script can't be run by the web server. | |
if(php_sapi_name()!=="cli"){ | |
echo "Must be run from the command line."; |
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
<?php | |
if(php_sapi_name()!=="cli"){ | |
echo "Must be run from the commend line."; | |
}; | |
/** | |
* Setup a magento instance so we can run this export from the command line. | |
*/ | |
require_once('app/Mage.php'); | |
umask(0); | |
if (!Mage::isInstalled()) { |
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 "Watching $1 \n" | |
#Usage: watch-apache.sh my.server.com | |
#Watch verbose server status | |
#watch -c -n 5 "links -dump http://$1:80/server-status | tail -n+20 | grep -v ::1" | |
#watch scoreboard w/ color and diff highlights | |
watch -c -d -n 5 "curl -s -X GET 'http://$1:80/server-status?auto'" |
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
<?php | |
//path to image magick | |
$convert = '/usr/local/bin/convert'; | |
$source = __DIR__ . '/all_images'; | |
$dest = __DIR__ . '/resize'; | |
$quality = 95; // 1-100 ; 92 is default. | |
$maxSize = 3680; //in pixels |
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 | |
# | |
# matrix: matrix-ish display for Bash terminal | |
# Author: Brett Terpstra 2012 <http://brettterpstra.com> | |
# Contributors: Lauri Ranta and Carl <http://blog.carlsensei.com/> | |
# | |
# A morning project. Could have been better, but I'm learning when to stop. | |
### Customization: | |
blue="\033[0;34m" |
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
<?php | |
$video = __DIR__ . '/video.mp4'; | |
$fps = 4; | |
# Convert an MP4 to a GIF - Requires ffmpeg | |
`ffmpeg -i "$video" -pix_fmt rgb24 -r $fps "$video.gif"` | |
# optimize the gif - Requires imagemagick | |
# via http://superuser.com/questions/436056/how-can-i-get-ffmpeg-to-convert-a-mov-to-a-gif |
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
# space150 vine-to-GIF | |
# given a vine.co uri, downloads the MP4 and creates an image sequence / GIF from it | |
# requires ruby, ffmpeg, and imagemagick | |
require 'open-uri' | |
require 'nokogiri' | |
id = ARGV[0] | |
# try to convert from URL to id. |
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 | |
#see your mojo profile for this key. Will change if your password is every updated. | |
mojo_access_key="xxxxx" | |
#A specific agent id number. See mojo url for id number. | |
mojo_assignee_id="xxxxx" | |
#URL to check for tickets. You can changes the filters to suite your need. | |
#This one only finds issues assigned to specific id with a status of new or in progress |
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
<?php | |
if(php_sapi_name()!=="cli"){ | |
echo "Must be run from the command line."; | |
}; | |
/** | |
* Setup a magento instance so we can run this export from the command line. | |
*/ |