Skip to content

Instantly share code, notes, and snippets.

View israeljrs's full-sized avatar

Israel Junior israeljrs

View GitHub Profile
@israeljrs
israeljrs / ngrxintro.md
Created September 22, 2017 13:04 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@israeljrs
israeljrs / styles.scss
Created September 23, 2017 01:07
Style.scss to ngx-bootstrap project.
/* You can add global styles to this file, and also import other style files */
@import '~bootstrap/dist/css/bootstrap.min.css';
.m-t-20 {
margin-top: 20px;
}
@israeljrs
israeljrs / app.module.ts
Created September 23, 2017 01:10
app.module.ts to ngx-bootstrap
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ModalModule, PopoverModule, RatingModule } from 'ngx-bootstrap';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
@israeljrs
israeljrs / app.component.ts
Created September 23, 2017 01:12
app.component.ts to ngx-bootstrap.
import { Component, TemplateRef } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/modal-options.class';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
@israeljrs
israeljrs / app.component.html
Created September 23, 2017 01:16
app.component.html to ngx-bootstrp.
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<div class="jumbotron">
<div class="h3 text-center">Exemplo do Ngx-Bootstrap.</div>
</div>
</div>
</div>
<div class="row">
@israeljrs
israeljrs / app.js
Created September 29, 2017 21:11 — forked from priscillaparodi/app.js
var express = require('express');
var request = require('request');
var bodyParser = require('body-parser');
var watson = require('watson-developer-cloud');
var app = express();
var contexid = "";
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
“body-parser”: “1.15.0”,
“request”: “2.72.0”,
“htmlparser”: “1.7.7”,
“watson-developer-cloud”: “2.0.1”
//note: add in dependencies
@israeljrs
israeljrs / pip_update.py
Created January 3, 2018 14:22
how update all packages.
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
@israeljrs
israeljrs / publish_angular_to_github.md
Created January 3, 2018 14:23
How publish angular sites into github.

Publicando projetos angular no github page.

Para publicar um projeto no github pages basta seguir os passos abaixo.

  1. Primeiro crie na branch master um diretorio o nome de "/docs"
  2. altere a key outDir de public para docs
  3. faça o build do projeto.
  • ng build --prod --base-href "https://<user-name>.github.io/<repo>/"
  1. faça o push para o repositório no github.
@israeljrs
israeljrs / application.js
Created January 8, 2018 14:48
Application js with support the turbolinks, cooffeescript and sweetalert2.
$(document).on 'turbolinks:load', ->
$('#btn1').on 'click', ->
swal('Information', 'Minha super mensagem.', 'success')