Skip to content

Instantly share code, notes, and snippets.

View rogeruiz's full-sized avatar
🚧
socorro, estoy enquevado dentro el internet

Roger Steve Ruiz rogeruiz

🚧
socorro, estoy enquevado dentro el internet
View GitHub Profile
<select>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
do ($ = jQuery) ->
# call your plugins here, man
return
@rogeruiz
rogeruiz / pluginBoilerplate.js
Created July 16, 2012 15:55
jQuery Boilerplate
/*!
* jQuery namespaced 'Starter' plugin boilerplate
* Author: @dougneiner
* Further changes: @addyosmani
* Licensed under the MIT license
*/
;(function($) {
// Create the Caesars namespace if it doesn't exist
@rogeruiz
rogeruiz / Solarized (Dark).tmTheme
Created August 6, 2012 15:12 — forked from eleclerc/Solarized (Dark).tmTheme
Solarized theme (dark & light) with markdown support for Sublime Text 2 editor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@rogeruiz
rogeruiz / namespaces.function.prototype.js
Created August 14, 2012 00:40
Organizing JavaScript with Namespaces and Function Prototypes
/* =============================================================================
@title Organizing JavaScript with Namespaces and Function Prototypes
@author by Jimmy Cuadra
@source http://jimmycuadra.com/posts/organizing-javascript-with-namespaces-and-function-prototypes
*/
// file : main.js
if (typeof MTNT == 'undefined'){
MTNT = {};
}
@rogeruiz
rogeruiz / mountain-lion-brew-setup.markdown
Created August 22, 2012 20:53 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@rogeruiz
rogeruiz / resize-timer.coffee
Created August 24, 2012 18:05
A resize event timer which fires a resize event only after the user has stopped resizing the window.
# Keep track of how many times the event as been triggered versus how many times
# the timer has been fired.
resizeFiredTotal = 0
reizeFiredCounter = 0
# Bind a resize event to the window
$(window).on 'resize', (e) ->
# Increment the resize fired event by 1
resizeFiredTotal += 1
@rogeruiz
rogeruiz / gist:3626214
Created September 4, 2012 20:41
Wear suncream

Wear sunscreen.

If I could offer you only one tip for the future, sunscreen would be it. The long-term benefits of sunscreen have been proved by scientists, whereas the rest of my advice has no basis more reliable than my own meandering experience. I will dispense this advice now.

Enjoy the power and beauty of your youth. Oh, never mind. You will not understand the power and beauty of your youth until they've faded. But trust me, in 20 years, you'll look back at photos of yourself and recall in a way you can't grasp now how much possibility lay before you and how fabulous you really looked. You are not as fat as you imagine.

Don't worry about the future. Or worry, but know that worrying is as effective as trying to solve an algebra equation by chewing bubble gum. The real troubles in your life are apt to be things that never crossed your worried mind, the kind that blindside you at 4 p.m. on some idle Tuesday.

Do one thing every day that scares you.

@rogeruiz
rogeruiz / jquery.infiniteCarousel.coffee
Created September 17, 2012 18:28
Basic Infinite Carousel jQuery Plugin in CoffeeScript
# Infinite Carousel Plugin
do ($ = jQuery, window = window) ->
pluginName = 'infiniteCarousel'
document = window.document
defaults =
onInit: ->
onNext: ->
onPrev: ->
@rogeruiz
rogeruiz / resizeDelay.globalDimensions.coffee
Last active October 10, 2015 19:27
Resize delay and window / document dimensions getter.
window.dimensions = {}
window.getDimensions = ->
window.dimensions.winX = $(window).width()
window.dimensions.winY = $(window).height()
window.dimensions.docX = $(document).width()
window.dimensions.docY = $(document).height()
return
window.resizeDelay = do ->