Skip to content

Instantly share code, notes, and snippets.

View nncl's full-sized avatar

Cauê Almeida nncl

View GitHub Profile
@nncl
nncl / New JSON
Created May 16, 2015 20:22
New JSON
[
{
"id":3,
"foto":"Imagens/pet1.jpg",
"nome":"Brutus",
"idade":0
},
{
"id":4,
"foto":"Imagens/pet4.jpg",
@nncl
nncl / Google Maps JS.md
Last active September 3, 2015 14:35
Multiple Markers w/ Google Maps API

Google Maps API

Multiple Markers

This is an example of how we can build with Google API a map that contains more than one simple marker.

Check the result [here] (http://codepen.io/nncl/pen/QjwKYL).

The HTML

Sass without Grunt/Gulp.md

  1. Run sass --watch style.scss:style.css
@nncl
nncl / AngularJS - ng-show.md
Last active October 2, 2015 11:41
AngularJS: Showing results from JSON only if there are results

Loop with Angular JS

<div class="myClass" ng-show="myController.news.length">
	<ul ng-controller="MyController as myController">
	    <li ng-repeat="news in myController.news">
	    	{{ news.title }}
	    	{{ news.description }}
	    </li>
	

Problems with Carvox.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@nncl
nncl / gist:4a7e62278cf6dca812b9
Last active October 9, 2015 20:37
Calc CSS3
.my-class {   
    width: calc(100% - 4px);
    width: -webkit-calc(100% - 4px);
    width: -moz-calc(100% - 4px);
}
@nncl
nncl / Diary JSON.md
Last active October 9, 2015 20:37
Diary
[
  {
    "id": "001",
    "title": "All Day Event", 
    "url": "http://google.com/",
    "start": "2015-04-01", 
    "end": null,
    "color": "#fec32b"
  },
@nncl
nncl / PHP Varible to JS.md
Last active October 15, 2015 22:28
Getting a PHP variable with jQuery

#PHP Varible to JS

On your .php file, for example:

$var = 'My PHP variable';
echo $var;

And in our .js file we'll make a POST to get the data from PHP:

@nncl
nncl / Pet.md
Last active November 6, 2015 12:13
Pet
{
 "data": {
  "animals": [
   {
      "id":1,
      "foto":"Imagens/pet1.jpg",
      "nome":"Pelotas 1",
      "idade": "1 ano"
 },
@nncl
nncl / maps.md
Last active November 6, 2015 19:47