Skip to content

Instantly share code, notes, and snippets.

View ericdouglas's full-sized avatar

Eric Douglas ericdouglas

View GitHub Profile
@ericdouglas
ericdouglas / hello-jade.jade
Last active January 4, 2016 04:29
Hello Jade!
doctype
html
head
meta(charset='utf-8')
title Hello Jade
body
header
nav
article
footer
@ericdouglas
ericdouglas / gist:8569055
Created January 22, 2014 22:50
Hello Jade Command Line

jade -P -w file.jade

  • -P: compile pretty html output
  • -w: watch files for changes and automatically re-render
@ericdouglas
ericdouglas / example-01-01-01.html
Created January 29, 2014 15:57
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 1 - Example 01</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
</head>
<body ng-app>
<h3>Here we are starting our Bushido AngularJS! Look at this sum ~> {{ 7 + 8 }}</h3>
@ericdouglas
ericdouglas / example-01-01-02.html
Created January 29, 2014 15:59
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 1 - Example 02</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
</head>
<body ng-app>
<h3>We could too concatenate strings! {{ "A" + "M" + "A" + "Z" + "I" + "N" + "G" + "!!!" }}</h3>
@ericdouglas
ericdouglas / example-01-02-01.html
Created January 29, 2014 16:22
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 2 - Example 01
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 2 - Example 01</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
</head>
<body ng-app>
<h3>Now, we just type here... <input type="text" ng-model="name"></h3>
@ericdouglas
ericdouglas / example-01-02-02.html
Created January 29, 2014 16:23
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 2 - Example 02
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 2 - Example 02</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
</head>
<body ng-app>
<h2>Define your informations:</h2>
@ericdouglas
ericdouglas / example-01-03-01.html
Created January 29, 2014 17:32
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 3 - Example 01
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 3 - Example 01</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.css">
<script src="example-01-03-01.js"></script>
</head>
<body ng-app ng-controller="Controller">
@ericdouglas
ericdouglas / example-01-04-01.html
Created January 30, 2014 19:36
Study of "Recipes With AngularJS" - Chapter 1 - Recipe 4 - Example 01
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Chapter 1 - Recipe 3 - Example 01</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
</head>
<body ng-app>
<input type="text" ng-model="up">
@ericdouglas
ericdouglas / cap-03-ex-01.js
Created January 31, 2014 11:58
Resolução do Exercício 01 do Capítulo 03 - JavaScript Eloquente
var numeroDeCamadas = 7,
contador = 1,
unidadeTijolo = "#",
tijolos = unidadeTijolo;
for ( ; contador <= numeroDeCamadas; contador += 1 ) {
console.log( tijolos );
tijolos += unidadeTijolo;
}
@ericdouglas
ericdouglas / dica-cap-03-ex-01.txt
Created January 31, 2014 12:05
Dica para resolução do Exercício 01 do Capítulo 03 - JavaScript Eloquente
Você pode começar com um programa que simplesmente imprimi os números de 1 a 7, que você pode derivar fazendo pequenas modificações do exemplo dado anteriormente que "imprimi cada número", quando o loop `for` foi introduzido.
Agora considere a equivalência entre números e strings do caracter hash. Você pode ir de 1 para 2 adicionando 1 (+= 1). Você pode ir de "#" para "##" adicionando o caracter (+= "#"). Assim, sua solução pode ser próxima do programa de impressão de números.