Skip to content

Instantly share code, notes, and snippets.

View raloliver's full-sized avatar

Israel Oliveira raloliver

View GitHub Profile
@raloliver
raloliver / README.md
Created August 15, 2021 16:23 — forked from e-cloud/README.md
Install mysql 8.0 on wsl
wget -c "https://gist.github.com/e-cloud/34acbefe0597a02f9a081a01eff6dd24/raw/3bad7148f60ab70659b0be14ef07b0bd4d019f62/install-mysql8-on-wsl.sh" install-mysql8-on-wsl.sh
chmod 740 install-mysql8-on-wsl.sh
./install-mysql8-on-wsl.sh
@raloliver
raloliver / ExportKindle.js
Created August 1, 2021 22:07 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@raloliver
raloliver / angular-directive-priority.md
Created May 31, 2021 09:18 — forked from mikesigs/angular-directive-priority.md
Angular Directive Priority - Quick Reference

##Angular Directive Priority - Quick Reference

When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile functions get called. Priority is defined as a number. Directives with greater numerical priority are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority is undefined. The default priority is 0.

For a brief description of each directive, click here.

Directive | Priority | Terminal | Creates new scope | Can be used as multiElement ---------- | :---------: | :---------: | :---------------

@raloliver
raloliver / git-reset-author.sh
Created June 1, 2020 16:31 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
class RoteiroBloc {
final _controller = StreamController();
// Criando a Stream para retornar para quem chamou
get stream => _controller.stream;
// Método para consultar os roteiros da cidade.
getRoteiros(){
Future future = Roteiro.getRoteiros();
future.then((roteiros){
@raloliver
raloliver / ContextCmder-Disable.reg
Last active September 30, 2018 07:56 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7/8
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@raloliver
raloliver / array_iteration_thoughts_pt-BR.md
Created September 7, 2018 20:59 — forked from felisio/array_iteration_thoughts_pt-BR.md
Métodos de iteração de Array

Métodos de iteração de Array

Adaptação do fork: (https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff)

Ao tentar explicar como o Javascript usa seu métodos para arrays, acabei reunindo esses conceitos. Espero que Seja util. Ficarei feliz com qualquer sugestão.

Introdução

O Objet Array no Javascript tem muitos métodos construidos no seu prototype. Alguns deles modificam o proprio array passado. Felizmente, a maioria não, eles retonar um novo array inteiramente distinto. Uma vez que arrays são conceitualmente uma lista de itens, ajuda na clareza do código e sua manutenção a ponto de ser capas de operar de uma forma mais "funcional" . (Eu insisto em refrenciar um array como uma "Lista" - embora em algumas linguaguens de programação, Lista é um tipo de dado nativo, mais em JS e nesse POST, estou me referindo ao conceito. Em todos os lugares que eu usar a palavra "lista" você pode assumir que eu estou falando de JS Array) Isso siginifica, para a execução de uma simples operação na Lista como um

@raloliver
raloliver / README-Template.md
Created September 5, 2018 08:30 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@raloliver
raloliver / GoogleSpreadsheet.html
Created November 30, 2017 14:35 — forked from terrywbrady/GoogleSpreadsheet.html
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}