Skip to content

Instantly share code, notes, and snippets.

View yeco's full-sized avatar

Jasson Cascante yeco

View GitHub Profile
/* ************************************************************************
sLoad - a chainable lazy loader
License:
MIT: http://www.opensource.org/licenses/mit-license.php
Authors:
* Yëco (http://elBleg.com)
@davist11
davist11 / Fancy File Inputs.js
Created October 25, 2010 21:32
Fancy File Inputs
var SITE = SITE || {};
SITE.fileInputs = function() {
var $this = $(this),
$val = $this.val(),
valArray = $val.split('\\'),
newVal = valArray[valArray.length-1],
$button = $this.siblings('.button'),
$fakeFile = $this.siblings('.file-holder');
if(newVal !== '') {
@joho
joho / accounts_controller.rb
Created November 25, 2010 23:25
possibly the funniest controller before filters we have in our codebase
class AccountsController < ActionController::Base
before_filter :lock_out_annoying_scammers
def lock_out_annoying_scammers
   if signed_in_user && signed_in_user.email =~ secret_hacker_regexp
     logger.warn 'One of those annoying scammers has tried to access the accounts controller'
     redirect_to 'http://www.amazon.com/Hackers-Jonny-Lee-Miller/dp/6305047456/' and return
   end
 end
end
@aaronrussell
aaronrussell / jquery.mobile.event.js
Created December 16, 2010 13:36
Slightly modified version of jQuery Mobile's event handlers so can be used standalone without the rest of the framework
/*
* jQuery Mobile Framework : events
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function($, undefined ) {
$.extend( $.support, {
orientation: "orientation" in window,
@jed
jed / README.md
Created April 4, 2011 14:02
a small module for autorequiring. warning: MAGIC!

autorequire.js

Copyright (c) 2011 Jed Schmidt

a small module for auto-importing modules in node.js.

usage

require( "./autorequire" )
require.auto( <module-name> )
@pec1985
pec1985 / customnav.js
Created June 22, 2011 15:24
Custom Navigation Controller, compatible with Android and iPhone
// Flags, is this for Android or iPhone?
var iPhone = false;
var Android = false;
if(Ti.Platform.osname == 'iphone'){
iPhone = true
};
if(Ti.Platform.osname == 'android'){
Android = true
};
@itsadok
itsadok / jquery.selectbox-1.2.js
Created August 11, 2011 12:48
jQuery selectbox plugin
/*
* jQuery selectbox plugin
*
* Copyright (c) 2007 Sadri Sahraoui (brainfault.com)
* Licensed under the GPL license and MIT:
* http://www.opensource.org/licenses/GPL-license.php
* http://www.opensource.org/licenses/mit-license.php
*
* The code is inspired from Autocomplete plugin (http://www.dyve.net/jquery/?autocomplete)
*
@pec1985
pec1985 / app.js
Created December 30, 2011 18:49
FaceBook slide in views
// Create a new project and copy this code into app.js
// if you use this code, please give me credit :)
function JustAView(text){
var view = Ti.UI.createView({
backgroundColor:"#"+((1<<24)*Math.random()|0).toString(16),
width:200,
height:100
});
var label = Ti.UI.createLabel({
@aemkei
aemkei / LICENSE.txt
Last active June 4, 2024 07:51 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@yeco
yeco / hack.sh
Created April 25, 2012 20:13
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2492984/hack.sh | sh
#