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
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
server { | |
listen 80; | |
listen 443 default_server ssl; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/myssl.crt; | |
ssl_certificate_key /etc/ssl/private/myssl.key; | |
server_name *.example.com; | |
root /var/www/vhosts/website; |
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
#!/bin/sh | |
FILE1=$1 | |
FILE2=$2 | |
grep -n -v "`cat $FILE1`" $FILE2 |
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(){ | |
if(window.console && (Math.round(Math.random() * 10))<7) { | |
var a = (Math.round(Math.random() * 2)) % 2 ? 'background-image:url(http://i.imgur.com/hHcgxw9.gif); padding:0 0px 185px 45px; color:red;' : 'background-image:url(http://i.imgur.com/67qDKDC.gif); padding:0 0px 225px 355px; color:red;'; | |
console.log("%c Here is a bug for you\n\n"+(new Array(18)).join("\n"),a); | |
} | |
})(); |
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
#!/usr/sh | |
curl -s http://pastebin.com/raw.php?i=gWHNJQyE | |
say "Happy Birthday to You, Happy Birthday to You" | |
say "Happy Birthday Dear Andre Castillo, Happy Birthday to You." | |
say "From good friends and true," | |
say "From old friends and new," | |
say "May good luck go with you," | |
say "And happiness too." | |
echo "\n\nHappy Birthday Peter :)\n" |
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: ./export_db_table_schemas.sh {custom directory} | |
MYSQL_USER="{username}" | |
MYSQL_PWD="{password}" | |
MYSQL_DB="{database}" | |
[ "$1" != "" ] && SQL_DIR=$1 || SQL_DIR="schemas" | |
mkdir -p $SQL_DIR |
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
/* | |
Author: Josue Rodriguez <josue@josuerodriguez.com> -- MIT License -- (c) 2012 | |
Purpose: Filter an object list | |
Usage: | |
<input type="text" id="filter_list"> | |
<div id="my_list"> | |
<div data-id="{id}">{label}</div> | |
<div data-id="{id}">{label}</div> | |
<div class="hide" id="list_empty">Non Available</div> |
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(){ | |
$.fn.onEnterKey = function(opts,callback){ | |
var opt = typeof target==="object" && target || {}; | |
var target = opts.target || typeof opts===jQuery && opts || typeof opts==="string" && opts || null; | |
var callback = opt.callback || typeof opts==="function" && opts || typeof callback==="function" && callback || function(target){ | |
$(target).trigger("click"); | |
}; | |
return this.live("keypress.onEnterKey",function(e){ | |
if(e.keyCode==13) { | |
callback.call(this,target); |