Skip to content

Instantly share code, notes, and snippets.

View rvlb's full-sized avatar

Renato Vieira rvlb

View GitHub Profile
// Como desabilitar o splitting de código JS após rodar o build (e deixar como era no CRA 1). Necessário dar eject
splitChunks: {
//chunks: 'all',
//name: false,
cacheGroups: {
default: false
}
},
//runtimeChunk: true,
@rvlb
rvlb / directory_structure.txt
Created May 11, 2018 02:27
Como fazer uma busca em Django ignorando acentuação independente de banco de dados
manage.py
utils.py
templates/
- foo/
- search.html
foo/
- models.py
- views.py
@rvlb
rvlb / index.html
Last active January 24, 2022 12:15
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Redux without React</title>
</head>
<body>
<div>
@rvlb
rvlb / drf-routing.md
Last active December 23, 2017 03:05
DRF Routing

DefaultRouter Routing

Basic methods

  • {route}/

    • GET => list()
    • POST => create()
  • {route}/{lookup}/

NÃO RECOMENDADO!

Terminal:

ng new my-project --style=scss
cd my-project
npm install --save bootstrap@4.0.0-alpha.6
ng serve
@rvlb
rvlb / ng-bootstrap-conf.md
Last active June 1, 2017 22:15
Passo a passo para configurar o Bootstrap e o Font Awesome no Angular

Terminal:

ng new my-project --style=scss
cd my-project
npm install --save bootstrap@4.0.0-alpha.6 @ng-bootstrap/ng-bootstrap font-awesome
ng serve

Em src/styles.scss, adicionar:

@rvlb
rvlb / post.swift
Created May 5, 2017 20:06
Módulos CITi
// Create an array of URLQueryItem that represent the key-value pairs of
// the query.
var queryItems = [URLQueryItem]()
queryItems.append(URLQueryItem(name: "key", value: "value"))
// Build the query with the data previously set
var query = NSURLComponents()
query.queryItems = queryItems
// Create an URLRequest using a previously defined url and set its method
@rvlb
rvlb / new.service.ts
Created May 5, 2017 19:58
A simple TypeScript REST API Service implementation (GET & POST)
import { Injectable } from '@angular/core';
import { Headers, Http, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/toPromise';
@Injectable()
export class NewService {
constructor(private http: Http) {}