Skip to content

Instantly share code, notes, and snippets.

View gosukiwi's full-sized avatar

Federico Ramirez gosukiwi

View GitHub Profile
@gosukiwi
gosukiwi / plugin.jquery.js
Last active August 29, 2015 14:00
jQuery plugin boilerplate
/*
* Minimal tooltip for jQuery by Federico Ramirez
*
* Usage: $('#myElement').myPlugin({});
* $('#myElement').myPlygin('myMethod', arg1, arg2);
* */
;(function ($, window, document, undefined) {
'use strict';
var pluginName = 'myPlugin',
/**
* 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 December 2, 2014 16:58
URYB Simple Parser
/**
* 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]
*
@gosukiwi
gosukiwi / gist:ba0eb9bce58abc49a5b5
Created December 14, 2014 03:46
Backbone's debounce
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 / gist:44deca9e627cf7827352
Created December 14, 2014 03:56
Backbone's throttle
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;
@gosukiwi
gosukiwi / finder.vim
Created January 25, 2015 16:09
Execute vimgrep and open results using <Leader>g
" 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
" ---------------------- 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 August 29, 2015 14:26 — forked from romainl/_rnb.md
RNB, a Vim colorscheme template
<%
# 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.

Test

This is a test markdown file!

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)]