Skip to content

Instantly share code, notes, and snippets.

@pablolazaro
pablolazaro / usefull-angular2-resources.md
Last active September 3, 2016 19:13
Usefull Angular 2 resources
@pablolazaro
pablolazaro / pr.md
Last active August 29, 2015 14:25 — forked from piscisaureus/pr.md
Checkout Stash pull requests locally

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

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = https://your.stash.domain/stash/scm/project/repo.git

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

@pablolazaro
pablolazaro / polymer-learning-resources.md
Last active August 29, 2015 14:23
Useful resources for Polymer learning
@pablolazaro
pablolazaro / gist:49f03ae1e22c25b0dc9b
Created January 2, 2015 09:16
Using a switch/case statement with numeric ranges
// Using a switch/case statement with numeric ranges is possible with this trick.
// http://modernweb.com/2013/12/23/45-useful-javascript-tips-tricks-and-best-practices/
function getCategory(age) {
var category = "";
switch (true) {
case isNaN(age):
category = "not an age";
break;
case (age >= 50):
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@pablolazaro
pablolazaro / Generate an AngularJS app with Yeoman
Created May 4, 2013 17:11
Generate an AngularJS app with Yeoman.
yo angular --minsafe