View es_quick_info.sh
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 |
View dump-resque-failed-jobs
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 |
View check_if_beast.hs
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 |
View client-startup.sh
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 |
View mixpanel.php
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() |
View start-mysql-sniffer
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 }'` | |
} |
View Ubiquity--PHP-basic-function-reference-search.js
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} |
View php_syntax_checker.sh
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 |
View tweet
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