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
@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:

@staltz
staltz / introrx.md
Last active May 2, 2024 12:31
The introduction to Reactive Programming you've been missing
@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");
@rolinger
rolinger / gist:d6500d65128db95f004041c2b636753a
Last active April 2, 2024 03:54
PHP => FCM Push notification tutorial for Android and iOS
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be
retired.
## THE BELOW METHOD IS THE NEWER FCM METHOD:
Register your app in the FCM Console: https://console.firebase.google.com (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
@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.
*/
@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'
});
});
});
<?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 {
@robsontenorio
robsontenorio / auth-refresh-token.js
Last active February 3, 2023 14:02
[OAUTH2][KEYCLOAK] Auto refresh token for @nuxtjs/auth module
const strategy = 'keycloak'
export default function ({ app }) {
const { $axios, $auth } = app
if (!$auth.loggedIn || !$auth.strategies[strategy])
return
const options = $auth.strategies.keycloak.options
@mvaldesdeleon
mvaldesdeleon / types-as-sets.ts
Created August 1, 2020 18:32
Types as Sets, draft
// Types as Sets, containing Values
// Union and Intersection Types can be thought as unions and intersections of the underlying Sets
// Type Compatibility can be thought of a subset relationship between the underlying Sets
//
// Usual Set concepts apply, such as:
// cardinality (the number of possible values of a given type)
// ø (empty set)
// unions, intersections, subsets, supersets, sums, products
//
// Lets look at some types...
@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 */