Skip to content

Instantly share code, notes, and snippets.

View nachodd's full-sized avatar

Ignacio Durand nachodd

  • Expero
  • Rosario, Santa Fé, Argentina
View GitHub Profile
@sasxa
sasxa / emitter.service.ts
Created January 2, 2016 05:27
Angular2 Communicating between sibling components
import {Injectable, EventEmitter} from 'angular2/core';
@Injectable()
export class EmitterService {
private static _emitters: { [ID: string]: EventEmitter<any> } = {};
static get(ID: string): EventEmitter<any> {
if (!this._emitters[ID])
this._emitters[ID] = new EventEmitter();
return this._emitters[ID];
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated for Laravel 4.2.16 on 2014-12-24.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@gabmontes
gabmontes / cbuvalidator.js
Last active October 27, 2022 15:01
Validator for "Clave Bancaria Uniforme", or CBU, as used in the Argentinean banking system
/**
* Validator and brute-force checksum generator for "Clave Bancaria Uniforme"
* fromat used in the Argentinan banking system.
*
* Legal stuff at http://www.infoleg.gob.ar/infolegInternet/anexos/45000-49999/47564/norma.htm
* Code based on https://gist.github.com/delucas/4526176
* Universal loader based on https://gist.github.com/jrburke/1262861
*/
/* global define, window */
@staltz
staltz / introrx.md
Last active May 2, 2024 12:31
The introduction to Reactive Programming you've been missing
@umidjons
umidjons / pub-sub.php
Created January 13, 2014 09:15
PubSub pattern / Events in PHP
<?php
// more: http://baylorrae.com/php-pubsub/
class PubSub
{
private static $events = array(); // all subscriptions
// Don't allow PubSub to be initialized outside this class
@omgmog
omgmog / parallax-scroll.js
Created October 28, 2013 15:26
Simple parallax background scrolling with jQuery
$(function() {
var $el = $('.parallax-background');
$(window).on('scroll', function () {
var scroll = $(document).scrollTop();
$el.css({
'background-position':'50% '+(-.4*scroll)+'px'
});
});
});
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@barryvdh
barryvdh / _ide_helper.php
Last active April 4, 2024 09:11
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/