Skip to content

Instantly share code, notes, and snippets.

View hectormenendez's full-sized avatar
🪡
Focusing

Hector Menendez hectormenendez

🪡
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hectormenendez on github.
  • I am etor (https://keybase.io/etor) on keybase.
  • I have a public key whose fingerprint is 063F 1200 5B87 95AB 262E 0EC5 7425 4EE3 3741 D2EE

To claim this, I am signing this object:

@hectormenendez
hectormenendez / core.extend.js
Created March 20, 2012 07:16
Simple extend.
/**
* Extends old object with new (returns a copy)
*
* @author Hector Menendez <etor.mx@gmail.com>
* @created 2011/NOV/21 17:41
* @updated 2012/MAR/20 01:13 Added support for unlimited arguments.
* Native properties will be ignored.
*/
core.extend = function(){
var args = private.arguments(arguments); // sanitize args
@hectormenendez
hectormenendez / app.js
Created December 2, 2011 08:24
app.js -- navgroup inside tabgroup
var tabGroup = Titanium.UI.createTabGroup();
// First tab, main window
var mainWinTab1 = Titanium.UI.createWindow({
title: 'Window 1'
});
var data = [{title: 'item one'}, {title: 'item two'}, {title: 'item three'}];
var table = Titanium.UI.createTableView({
data: data
@hectormenendez
hectormenendez / extend.js
Created November 17, 2011 15:06
jQuery.extend
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
deep = target;
@hectormenendez
hectormenendez / .bashrc
Created November 14, 2011 02:06
.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# don't put duplicate lines in the history.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
<?php
class DBControl {
private $__db = null;
private $__parent = null;
private function __appendDB($name,$args){
# Get method's declared parameters.
$params = $this->__parent->getMethod($name)->getParameters();