Skip to content

Instantly share code, notes, and snippets.

View rickycheers's full-sized avatar

Ricardo rickycheers

  • BoldBrush Inc.
  • San Antonio
  • 17:46 (UTC -06:00)
View GitHub Profile
@rickycheers
rickycheers / index.html
Created January 19, 2012 19:06
A very lightweight "Show/Hide" carousel in jQuery
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="showhide.js"></script>
<link rel="stylesheet" href="style.css" />
<title>Show Hide Snippet</title>
</head>
<body>
<div id="showhide_container">
<div class="showhide_element">Element #1</div>
@rickycheers
rickycheers / CurrencyFormatter.js
Created August 14, 2012 22:58
A couple of functions to apply currency format to an amount number in javascript
function applyFormat(value){
value = typeof value == 'number' ? value.toString() : value;
value = value.replace(/\$|\,/g, '');
if( isNaN(value) ){
return '$X,XXX';
}
var integer = value.split('.')[0];
@rickycheers
rickycheers / minimum_amount_2d_forms.js
Created November 27, 2012 23:55
Minimum Amount 2D Forms
// copy and paste this code into your page source inside <script></script> tags
(function($){
$(document).ready(attachEvent);
function attachEvent(){
minimum_amount = 1; //update this
$form = $('form#commerce_3'); //update this
$overlay = $('#overlay');
$processing = $('#processing');
$custom_radio_button = $('#frmItem_130_347'); //update this
$custom_donation_input = $('#donation_value_103_347') //update this
@rickycheers
rickycheers / unstoppable_app.js
Last active December 10, 2015 10:43
Backbone App - Unstoppable Templates Controller
(function($){
$(function(){
//$('.box-content').hide();
var AppRouter = Backbone.Router.extend({
routes: {
//"section/:s": "goToSection",
@rickycheers
rickycheers / ucwords.js
Created January 15, 2013 19:45
ucwords in JavaScript - Equivalent to PHP's ucwords() Returns a string with the first letter in upper case of each word.
String.prototype.ucwords = function() {
str = this.toLowerCase();
return str.replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g,
function(s){
return s.toUpperCase();
});
};
@rickycheers
rickycheers / only_numbers.js
Created January 28, 2013 22:56
Callback implementation for only allowing the insertion of numbers on an input.
$('#selector').on('keydown', onlyNumber);
function onlyNumber(event){
// Allow: backspace, delete, tab, escape, and enter
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 ||
// Allow: Ctrl+A
(event.keyCode == 65 && event.ctrlKey === true) ||
// Allow: home, end, left, right
(event.keyCode >= 35 && event.keyCode <= 39) ||
// Allow point

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@rickycheers
rickycheers / README.md
Created February 21, 2013 21:57 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@rickycheers
rickycheers / vacante-digizent.md
Created March 12, 2013 19:21
Vacante de Desarrollador Web

##Acerca de Nosotros

Somos una empresa basada en Texas con oficinas en la ciudad de Puebla.

Nos dedicamos, por un lado, a dar servicio a "asociaciones sin fines de lucro" en los EE. UU. realizando sitios, micro sitios, campañas de correo y recaudación de donativos a través de internet.

Por otro lado, tenemos un equipo que se encarga 100% de desarrollar junto con un equipo en los EE. UU. la plataforma de recaudación de donativos a través de internet.

Si quieren saber mas sobre nosotros visiten: http://digizent.com.

The ADB excecutable lives in:
[path-to-android-sdk]/platform-tools/
./adb -e logcat | grep TiAPI
or
./adb -d logcat | grep TiAPI