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 | |
# Ensure file is executable: chmod +x es_quick_info.sh | |
# Use given host or default to localhost | |
[ "$1" != "" ] && HOST=$1 || HOST="localhost:9200" | |
ES_EXIST=`curl -s "$HOST" | grep 'ok'` | |
if [ "$ES_EXIST" = "" ]; 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 | |
# To extract from localhost '127.0.0.1:6379', you can quickly do: | |
# usage: curl -L http://git.io/dump-resque-failed-jobs-test | sh | |
[ "$1" != "" ] && IP=$1 || IP=127.0.0.1 | |
[ "$2" != "" ] && PORT=$2 || PORT=6379 | |
redis-cli -h $IP -p $PORT LRANGE resque:failed 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
import System.Environment | |
import Data.Char | |
main = promptNameAndSave | |
matchesName s = if (map toUpper s) == "JOSUE" then True else False | |
checkIfBeast str = if matchesName str then "a BEAST !" else "normal." | |
finalMessage h i = "Thanks " ++ h ++ ", you are " ++ i |
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 | |
CLIENT=$1 | |
DIR_DEPLOY="/var/www/vhosts/deploy" | |
CLIENT_DIR="$DIR_DEPLOY/$CLIENT" | |
echo "- Switching to client dir: $CLIENT_DIR" | |
cd $CLIENT_DIR | |
echo |
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 | |
// Mixpanel - Simple wrapper using only the mixpanel.track() endpoint. | |
function Mixpanel($event, $props = array(), $distinct_id = 0) { | |
$api_key = '{api-key}'; | |
$data = array( | |
'event' => $event, | |
'properties' => array( | |
'distinct_id' => $distinct_id, | |
'token' => $api_key, | |
'time' => time() |
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 | |
APP="mysql-sniffer" | |
LOG="/tmp/mysql-sniffer.log" | |
PID="" | |
get_pid () { | |
PID=`ps aux | grep "$APP" | grep -v grep | grep -v "$0" | awk '{ print $2 }'` | |
} |
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
CmdUtils.CreateCommand({ | |
names: ["php"], | |
icon: "http://static.php.net/www.php.net/favicon.ico", | |
description: "Check PHP function specs and comments. (v0.4)", | |
help: "PHP", | |
author: {name: "Josue Rodriguez", email: "josue@josuerodriguez.com"}, | |
license: "MIT", | |
homepage: "http://josuerodriguez.com", | |
arguments: [ | |
{role: "object", label: 'function', nountype: noun_arb_text} |
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 | |
# Author: Josue Rodriguez (@JosueR) | |
# Grabs the current pwd via Git repo then performs a php syntax on all php files. | |
me="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")" | |
Git_Root=$(readlink -f ./$(git rev-parse --show-cdup)) | |
option=$1 | |
files_found=0 | |
counter=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/bash | |
# file: tweet | |
# NOTE: make sure to put this file in '/usr/bin' and make it executable: sudo chmod +x /usr/bin/tweet | |
# usage: tweet "hello from CLI" | |
user="USERNAME" | |
pass="PASSWORD" | |
tweet=$1 |
OlderNewer