Skip to content

Instantly share code, notes, and snippets.

Avatar

Federico Ramirez gosukiwi

View GitHub Profile
@gosukiwi
gosukiwi / plugin.jquery.js
Last active Aug 29, 2015
jQuery plugin boilerplate
View plugin.jquery.js
/*
* Minimal tooltip for jQuery by Federico Ramirez
*
* Usage: $('#myElement').myPlugin({});
* $('#myElement').myPlygin('myMethod', arg1, arg2);
* */
;(function ($, window, document, undefined) {
'use strict';
var pluginName = 'myPlugin',
View oo.js
/**
* Object Oriented JS Utils
*/
var oo = {
/**
* `methods` parameter is optional, if base is not
* defined assume it was defined in method's place,
* that way this method can be called as follows:
*
* `var Class = oo.extend(function () {}, BaseClass);`
@gosukiwi
gosukiwi / parser.js
Created Dec 2, 2014
URYB Simple Parser
View parser.js
/**
* URYB parser. It transforms a list of tokens into an AST.
*
* Definitions:
* Atom/Terminal: Somthing which is a value itself
* Example: 1, "a string"
*
* Expression: Right hand side of an assignment
* Example: 1, "string", function_call(), array[1], mixed()[1]
*
View gist:44deca9e627cf7827352
var throttle = function (func, wait, options) {
var context, args, result;
var timeout = null;
var previous = 0;
if (!options) options = {};
var later = function () {
previous = options.leading === false ? 0 : new Date().getTime();
timeout = null;
result = func.apply(context, args);
if (!timeout) context = args = null;
View gist:ba0eb9bce58abc49a5b5
var debounce = function(func, wait, immediate) {
var timeout, args, context, timestamp, result;
var now = Date.now || function() {
return new Date().getTime();
};
var later = function() {
var last = now() - timestamp;
@gosukiwi
gosukiwi / finder.vim
Created Jan 25, 2015
Execute vimgrep and open results using <Leader>g
View finder.vim
" Vim Finder plugin
" Wrapper around Vim's grep to make things easier
" Author: Federico Ramirez <fedra.arg@gmail.com>
" Licence: MIT
" Give the user a chance to not load the plugin, also discard the possibility
" of loading it more than once
if exists("g:loaded_finder")
finish
endif
View gist:54de336104eed4372188
" ---------------------- USABILITY CONFIGURATION ----------------------
" Basic and pretty much needed settings to provide a solid base for
" source code editting
" don't make vim compatible with vi
set nocompatible
" turn on syntax highlighting
syntax on
" and show line numbers
@gosukiwi
gosukiwi / rnb.erb
Last active Aug 29, 2015 — forked from romainl/_rnb.md
RNB, a Vim colorscheme template
View rnb.erb
<%
# RNB, A VIM COLORSCHEME TEMPLATE
# Author: Romain Lafourcade (https://github.com/romainl)
# Canonical URL: https://gist.github.com/romainl/5cd2f4ec222805f49eca
# This template is designed to help vimmers create their own colorschemes
# without much effort.
#
# You will need Ruby to generate your colorscheme but Ruby knowledge is
# not needed at all.
View test.md

Test

This is a test markdown file!

View gist:3170709
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace Emberjs_TODO_List
{
[WebService(Namespace = "http://gosukiwi.blogspot.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]