Skip to content

Instantly share code, notes, and snippets.

Juan Martínez jbmartinez

Block or report user

Report or block jbmartinez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jbmartinez / async.js
Created Jul 26, 2015
Processing an array when data comes from several asynchronous requests in angular.js
View async.js
var url = ""
// arr is an array containing values for a parameter
$q.all( {
// return promises
return $http.get(url, {param: element});
})).then(function(data) {
// do something with data
// data is an array of responses
var transformedData = {
jbmartinez / styles.css
Created Jul 26, 2015
A basic template for styles I use alongside with Pure.css
View styles.css
When setting the primary font stack, apply it to the Pure grid units along
with `html`, `button`, `input`, `select`, and `textarea`. Pure Grids use
specific font stacks to ensure the greatest OS/browser compatibility.
html, button, input, select, textarea,
.pure-g [class *= "pure-u"] {
/* Set your content font stack here: */
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
jbmartinez / quotes.json
Last active Nov 19, 2015
A bunch of quotes in JSON format (taken from
View quotes.json
{"text": "You can do anything, but not everything.",
"author": "David Allen"},
{"text": "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.",
"author": "Antoine de Saint-Exupéry"},
{"text": "The richest man is not he who has the most, but he who needs the least.",
"author": "Unknown Author"},
You can’t perform that action at this time.