Skip to content

Instantly share code, notes, and snippets.

View samverneck's full-sized avatar

SAMUEL VERNECK samverneck

View GitHub Profile
var path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'src') + '/app/index.js',
output: {
path: path.resolve(__dirname, 'dist') + '/app',
filename: 'bundle.js',
publicPath: '/app/'
},
@samverneck
samverneck / wget
Created June 25, 2017 21:22 — forked from jasperf/wget
Wget examples
# Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@samverneck
samverneck / 01_estrutura_projetos_frontend_sem_gruntjs.md
Created May 16, 2017 15:15 — forked from erkobridee/01_estrutura_projetos_frontend_sem_gruntjs.md
proposta de estrutura de diretórios para projetos frontend, sem ou com GruntJS (para executar o GruntJS é necessário ter o Node.js)

Sem GruntJS

projeto tradicional

/root
  /shared
     - código compartilhado na aplicação | seguir o modelo de diretórios adotado em /app

  /app
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://ftp.br.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.br.debian.org/debian/ jessie main contrib non-free
###### Debian Update Repos
deb http://security.debian.org/ jessie/updates main contrib non-free
@samverneck
samverneck / Calisthenics.md
Created April 17, 2017 20:42 — forked from suissa/Calisthenics.md
As 9 Regras do Object Calisthenics

Object Calisthenics descreve 9 regras básicas - pt-br

  1. Um nível de recuo por método.
  2. Não use a palavra-chave ELSE.
  3. Envolver todos os primitivos e Strings em classes. (em JS nao eh necessario)
  4. Funções de primeira classe // mudei p/ Function em vez de Class
  5. Um ponto por linha.
  6. Não abrevie.
  7. Mantenha todas os módulos com menos de 50 linhas.
  8. Nenhuma classe com mais de duas variáveis ​​de instância.
@samverneck
samverneck / Calisthenics.md
Created April 17, 2017 20:42 — forked from suissa/Calisthenics.md
As 9 Regras do Object Calisthenics

Object Calisthenics descreve 9 regras básicas - pt-br

  1. Um nível de recuo por método.
  2. Não use a palavra-chave ELSE.
  3. Envolver todos os primitivos e Strings em classes. (em JS nao eh necessario)
  4. Funções de primeira classe // mudei p/ Function em vez de Class
  5. Um ponto por linha.
  6. Não abrevie.
  7. Mantenha todas os módulos com menos de 50 linhas.
  8. Nenhuma classe com mais de duas variáveis ​​de instância.
@samverneck
samverneck / App.ts
Created March 15, 2017 02:16 — forked from PeterOrneholm/App.ts
TypeScript position example
import {IPositionTracker} from "IPositionTracker";
import GeoLocationPositionTracker from "GeoLocationPositionTracker";
class App {
constructor(private positionTracker : IPositionTracker) {
}
start(): void {
this.positionTracker.subscribe(c => {
alert(`Lat: ${c.latitude}; Lon: ${c.longitude}`);
@samverneck
samverneck / getContentsFromMDN.js
Created February 13, 2017 23:52 — forked from suissa/getContentsFromMDN.js
Pega e salva os conteúdos da MDN
const cheerio = require('cheerio')
const rp = require('request-promise')
const links = require('./links')
const createFile = require('./createFile')
const options = {
uri: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/`,
transform: (body) => cheerio.load(body),
}