Skip to content

Instantly share code, notes, and snippets.

View j0lvera's full-sized avatar
🎯
Focusing

Juan Olvera j0lvera

🎯
Focusing
View GitHub Profile
@j0lvera
j0lvera / code.js
Created March 22, 2013 01:17
Color Animation - jQuery
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://raw.github.com/jquery/jquery-color/master/jquery.color.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="test">test</div>
@j0lvera
j0lvera / .vimrc
Last active December 15, 2015 07:49
.vimrc
syntax on
set tabstop=2
set shiftwidth=2
set smarttab
set clipboard+=unnamed
set incsearch
set title
set nobackup
set autoindent
set noswapfile
@j0lvera
j0lvera / plugin.js
Last active December 15, 2015 15:09
jQuery plugin boilerplate
;(function($, window, document) {
$.fn.pluginName = function(options) {
// defaults
var d = $.extend({
default: 1
}, options);
// settings or bindUI
var s = {

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/usr/bin/env ruby
#
# Pomodoro script.
#
# Displays a notification after 25 minutes.
#
# Don't forget to 'sudo apt-get install libnotify-bin'
#
system "notify-send -i face-cool 'Go go go!'"

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

var curry = (function () {
var makeFn = function (fn, arity, reverse, prevArgs) {
return function () {
var newArgs = Array.prototype.slice.call(arguments, 0),
args = prevArgs.concat(newArgs);
if (args.length < arity) {
return makeFn(fn, arity, reverse, args);
} else {
return fn.apply(null, reverse ? args.reverse() : args);
@j0lvera
j0lvera / learn.py
Last active December 26, 2015 14:28
python in a nutshell
# Multiline
print 'something\
else'
print """algo
>> algo """
# Length
len('string')
len(variable)
@j0lvera
j0lvera / code.js
Created November 18, 2013 19:43
eliquidhouston.com code to adult popup
/* Adult Popup Window */
(function($){
"use strict";
var container = $('.modal-container'),
over = $('.over'),
under = $('.under'),
disableScroll = true;
if ( ! localStorage.getItem('adult') ) {
@j0lvera
j0lvera / example.html
Last active December 28, 2015 20:29
litebox, minimalistic jQuery plugin that lightbox any DOM element
<!doctype html>
<html>
<head>
<title>jQueryPlugins</title>
<style>
body {
background: #fafafa;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333;
}