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: "[email protected]"}, | |
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 |
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 | |
# Created by: Josue Rodriguez <[email protected]> (c) 2010. | |
# Clear MySQL Cache | |
# Download file into directory "/usr/bin" then run "sudo chmod +x /usr/bin/mysqlclearcache" | |
mysql_options=$1 | |
if [ "$mysql_options" == "--help" ]; 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
String.prototype.trim = function() { return this.toString().replace(/^\s+/,'').replace(/\s+$/,''); }; | |
String.prototype.ToJSON = function() { | |
var quotes = function(s) { return (s||'').toString().replace(/^"/,'').replace(/"$/,'').replace(/^'/,'').replace(/'$/,'').trim(); }; | |
var commas = function() { | |
this.change = function(s){ | |
var s = (s||'').toString(); | |
if(/.*:.*/.test(s) && /('.*,.*')/.test(s)) { | |
var x = s.match(/('.*,.*')/)[1] || ''; var orig = x; var n = x.match(/,/g).length; | |
for(i=1; i<=n; 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
$(function(){ | |
// jQuery - DummyImage | |
// Josue Rodriguez (c) 2010-12-30, MIT License | |
$.fn.dummyImage = (function(options) { | |
var opt = { | |
'class' : 'dummyImage', | |
'display' : 'inline-block', | |
'position' : 'relative', |
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
/* =========================================================================== | |
Copyright (c) 2011 - Josue Rodriguez <[email protected]> | |
Permission is hereby granted, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, and/or distribute copies of the Software, | |
and to permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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 <[email protected]> | |
* Created: 2011-06-30 | |
* License: MIT | |
* Description: Collects OpenGraph tag data from markup into an object list. | |
*/ | |
var OpenGraph = function(opts){ | |
var opt = opts || {}; | |
var context = opt.DOM || typeof opts==="string" && opts || document; |
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
// prerequisites: jQuery library. | |
getInputs = function(t,f){ | |
var opt = typeof t==="object" && t || {}; | |
var target = opt.target || (t===jQuery || typeof t==="string") && t; | |
var filter = opt.filter || f; | |
var A = { | |
serialized: {}, | |
fields: $("input,textarea,select", target || document) | |
}; |
OlderNewer