Skip to content

Instantly share code, notes, and snippets.

View ericdouglas's full-sized avatar

Eric Douglas ericdouglas

View GitHub Profile
@ericdouglas
ericdouglas / gulpfile.js
Created February 7, 2014 00:14
Error gulpifle
// error
var gulp = require('gulp');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var EXPRESS_PORT = 4000;
var EXPRESS_ROOT = __dirname;
var LIVERELOAD_PORT = 35729;
var lr;
@ericdouglas
ericdouglas / spec-sum.js
Last active August 29, 2015 13:56
Test and debug returning different values
describe('function that sum numbers between 1 and 100', function () {
var out = sum;
it('verify if the sum is correct', function () {
expect( out ).toBeDefined();
expect( out() ).toBe( 5050 );
});
@ericdouglas
ericdouglas / package.json
Created February 13, 2014 23:27
Package.json
{
"name": "001",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@ericdouglas
ericdouglas / vim-shortcuts.md
Last active August 29, 2015 13:56
Vim Shortcuts =)

Dica: digite vimtutor no seu terminal e siga este simples tutorial, bem explicativo por sinal =)

  • Abrir/fechar/salvar aquivo:

  • :q fecha o arquivo

  • :q! fecha o arquivo mesmo sem ter salvo as alterações

  • ZZ ou :wq salva e fecha um arquivo

  • Deletando palavras e linhas

  • dw deleta até o fim da palavra, incluindo o espaço

  • de deleta até o fim da palavra, NÃO incluindo o espaço

@ericdouglas
ericdouglas / jasmine-01.js
Created February 19, 2014 00:45
Jasmine: Guia de Bolso - Parte 1
// Sintaxe padrão de um conjunto de testes
describe("Um conjunto", function () {
it("contém uma especificação com uma expectativa", function () {
expect(true).toBe(true);
});
});
// Outro exemplo de como utilizar o conjunto de testes
describe("Um conjunto é apenas uma função", function () {
var a;
@ericdouglas
ericdouglas / hello.jade
Created February 19, 2014 01:08
Guerreiros Web Eficazes e suas Ferramentas - hello.jade
doctype
html
head
meta(charset="utf-8")
title Prévia do Jade
body
h1 Bushido JavaScript
p Iniciando nossa jornada...
@ericdouglas
ericdouglas / hello.html
Created February 19, 2014 01:18
Guerreiros Web Eficazes e suas Ferramentas - hello.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Prévia do Jade</title>
</head>
<body>
<h1>Bushido JavaScript</h1>
<p>Iniciando nossa jornada...</p>
</body>
@ericdouglas
ericdouglas / estilo.styl
Last active August 29, 2015 13:56
Guerreiros Web Eficazes e suas Ferramentas - estilo.styl
.menu-setores
position absolute
bottom 0
right 0
ul
font-size 15px
li
display inline
@ericdouglas
ericdouglas / estilo.css
Last active August 29, 2015 13:56
Guerreiros Web Eficazes e suas Ferramentas - estilo.css
.menu-setores {
position: absolute;
bottom: 0;
right: 0;
}
.menu-setores ul {
font-size: 15px;
}
.menu-setores ul li {
display: inline;
.menu-setores
position absolute
bottom 0
right 0
ul
font-size 15px
li
display inline