Skip to content

Instantly share code, notes, and snippets.

View samverneck's full-sized avatar

SAMUEL VERNECK samverneck

View GitHub Profile

UBUNTU

INSTALAÇÕES

  • VSCode
Baixe no site. [https://code.visualstudio.com/]
cd Downloads
depois
sudo dpkg -i code_1.12.1-1493934083_amd64.deb
sudo apt-get install -f # Install dependencies

CONCEITOS BÁSICOS DE ANGULAR 2

AngularJS 2.0 esse será o ponta pé inicial dos meus posts em 2016. Ouvimos falar bastante sobre TypeScript e a importância dessa nova tecnologia, em paralelo sempre temos alguém falando que a nova versão do nosso querido e mais popular Framework SPA vai ser baseado em TS.

Esse é o primeiro artigo de uma série onde vamos abordar o Angular 2 e todas as suas novidades, hoje vamos ver assuntos bem básicos e introdutórios sobre o assunto abordado e ao longo dos materiais compartilhados vamos avançando.

O AngularJS 2.0

Vou pular a parte que imagino que todos já devem saber sobre o que é o AngularJS e quais os problemas ele resolve, temos diversos materiais na comunidade que explicam muito bem esses tópicos que citei acima e ótimos cursos também. Nesse tópico vou falar sobre algumas características que da nova versão do Angular, algumas que já existiam na sua primeira versão, porém estão fantasticamente mais legais na versão 2.

@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
<form (submit)="$event.preventDefault()">
<div class="form-group">
<label for="email">EMAIL:</label>
<input [(ngModel)]="usuario.email" type="email" id="email" class="form-control">
</div>
<div class="form-group">
<label for="senha">SENHA:</label>
<input [(ngModel)]="usuario.senha" type="password" id="senha" class="form-control">
</div>
<button class="btn waves-effect waves-light"
Mais à esquerda eu falei sobre tipos de dados (string, float, double e integer), depois como eles concatenam (juntar duas strings, dois floats e etc)

Um pouco antes do meio, ainda da esquerda pra direita eu expliquei sobre codificação da string (UTF-8, ANSI, Unicode) e o que era o ASCII

Antes do meio embaixo expliquei sobre manipuladores de memória e o uso para desenvolvimento de exploits

$(document).ready(function() {
function ren() {
// render the page -- in case you're wondering,
// nothing will work without javascript!
$("#tit").html('<font face="Garamond"><h1>&nbsp;&nbsp;<i>sleepyti.me <font color="lightblue">bedtime calculator</font></i></h1></font>');
var mrend = '';
mrend = mrend +
'<table><tr width="100%">' +
'<td width="20%"></td>' +
'<td><span class="intro"><font face="Garamond" size=5>I have to wake up at <span class="waketime" style="display:none;"></span>&nbsp;</td>' +
@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
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/'
},
samuel@develop:~/Documentos/xDevel/Teste/sing-angular-cli$ yarn start
yarn start v0.24.4
$ ng serve 
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200 **
Hash: 9577620142e18e9c6890                                                              
Time: 147318ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 158 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 6.16 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.7 kB {4} [initial] [rendered]