This is an example readme file to include as a 'gist module' in a git repository
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.0"> | |
<Document> | |
<Placemark> | |
<name>2014-03-05T09:56:58.630Z</name> | |
<Point><coordinates>169.8222,-14.7347,0</coordinates></Point> | |
</Placemark> | |
<Placemark> | |
<name>2014-03-02T20:11:22.640Z</name> | |
<Point><coordinates>127.3354,27.4052,0</coordinates></Point> |
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 | |
/** | |
* Created by PhpStorm. | |
* User: jlroberts | |
* Date: 10/18/14 | |
* Time: 12:42 PM | |
*/ | |
define('JLR_ROOT', '/vagrant/web'); | |
$siteName = "Jeff's Site"; |
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
# Reload bashrc function | |
function brc { | |
. /etc/bashrc | |
. ~/.bashrc | |
} |
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 | |
if [ -f /tmp/git-pull.pid ] | |
then | |
exit 0 | |
fi | |
cd /v2a/sites/mage/mage.base | |
GIT_OUTPUT=`git pull` | |
if [ "$GIT_OUTPUT" -eq "Already up-to-date." ] |
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 | |
$start_date = strtotime('3 months ago'); | |
$start_quarter = ceil(date('m', $start_date) / 3); | |
$start_month = ($start_quarter * 3) - 2; | |
$start_year = date('Y', $start_date); | |
$start_timestamp = mktime(0, 0, 0, $start_month, 1, $start_year); | |
echo $start_timestamp; |
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
resolve_sub_dirs() { | |
path="" | |
path_arg="$1" | |
search="$path_arg/sub-"* | |
for command in $search; do | |
if [ -d "$command" ]; then | |
if [ "$path" != "" ]; then | |
path="$command:$path" | |
else |
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 | |
# Usage: sub mytop [-u (username)] [-p (password)] | |
# Summary: Watch MySQL Processes / Queries | |
# Help: Take a snapshot of what mysql queries are running in one second intervals | |
# Reference: http://akrabat.com/software/the-watch-linux-command-line-tool/ | |
set -e | |
# Default Username & Password | |
_MYTOP_PASSWORD="-pYOURPASSWORD" # or "" for no 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/sh | |
# | |
# <daemonname> <summary> | |
# | |
# chkconfig: <default runlevel(s)> <start> <stop> | |
# description: <description, split multiple lines with \ | |
# a backslash> | |
### BEGIN INIT INFO | |
# Provides: |
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 load_queues($path) { | |
$queuesTemp = array(); | |
$contents = file_get_contents($path); | |
$contents = explode("\n", $contents); | |
foreach($contents as $content) | |
{ | |
if(!in_array(trim($content), $queuesTemp)) { | |
$queuesTemp[] = trim($content); |
OlderNewer