Skip to content

Instantly share code, notes, and snippets.

Avatar
💙
Always deliver more than expected.

Luiz Freneda lfreneda

💙
Always deliver more than expected.
View GitHub Profile
@lfreneda
lfreneda / colors.md
Last active Mar 21, 2020 — forked from irisli/colors.md
Github Flavored Markdown (GFM) Colored text
View colors.md
- all Byzantine agreement protocols, SCP makes no assumptions about the rational behavior of attackers.
- Atenção: Sempre crie sua branch a partir da master
- A não ser que sua funcionalidade dependa de uma mudança estrutural muito grande em outra branch não mergiada :(
@lfreneda
lfreneda / documentação-materiais.js
Last active Feb 14, 2020
documentação-materiais.md
View documentação-materiais.js
(function() { window.location = 'https://developers.fieldcontrol.com.br/#api-field-control'; })();
View mocking_http_angularjs
describe('HTTP GET', function () {
it("get github username", function () {
var response;
$httpBackend.when('GET', 'https://api.github.com/users/marciofmjr')
.respond(200, {worked: true});
ContaAzulHelper.github().then(function(data) {
response = data;
});
View create_cloudfront_invalidation.js
const aws = require('aws-sdk')
const moment = require('moment')
const callerReference = moment().format('YYYYMMDDHHmmss')
aws.config.update({
credentials: {
accessKeyId: 'shhhhhhhhhhh',
secretAccessKey: 'shhhhhhhhhhhh'
}
})
const cloudfront = new aws.CloudFront()
View pushNotificatonService.js
import { Injectable } from '@angular/core';
import {
Platform,
AlertController
} from 'ionic-angular';
import {
Push,
PushObject
} from '@ionic-native/push';
@lfreneda
lfreneda / naming-meh.js
Created Oct 22, 2018
Waaaaaaat is this working?!!
View naming-meh.js
async function Bolsonaro2018 (daQEuTeDouOtra, talkei) {
if (talkei && daQEuTeDouOtra) {
const mito = await db['mitos'].brasilAcimaDeTudoDeusAcimaDeTodos({ id: this.robo.id })
if (!mito) {
return null
}
const kitGay = await capitao.vote17(daQEuTeDouOtra, mito.password)
if (!kitGay) {
return null
@lfreneda
lfreneda / js-scrapping-muwhahah.js
Last active Jan 20, 2018
getting all startup quote images :P
View js-scrapping-muwhahah.js
document.querySelectorAll('.entry img').forEach(function(image) {
var filename = image.alt.replace(/[^\w\s]/gi, '').replace(/\s+/g, '-').toLowerCase() + '.png';
console.log('wget', '-O', filename, image.currentSrc);
});
@lfreneda
lfreneda / integrations-curls-calls.sh
Created Nov 29, 2017
integrations-curls-calls.sh
View integrations-curls-calls.sh
```
curl 'http://api.fieldcontrol.com.br/orders/' -H 'Content-Type: application/json;charset=UTF-8' -H 'x-access-token: seu-token-aqui' --data-binary $'{
"address": {
"zipCode": "05005900",
"city": "Sao Paulo",
"state": "SP",
"street": "Rua Turiassu",
"number": "902",
"complement": null,
"neighborhood": null,
@lfreneda
lfreneda / collapse.js
Last active Sep 6, 2017 — forked from dmfay/collapse.js
Collapse JOIN query result sets into a hierarchical object graph
View collapse.js
'use strict';
if (!String.prototype.endsWith) {
String.prototype.endsWith = function(searchStr, Position) {
// This works much better than >= because
// it compensates for NaN:
if (!(Position < this.length))
Position = this.length;
else
Position |= 0; // round position
@lfreneda
lfreneda / web-security-checklist.md
Last active Jul 24, 2017
web-security-checklist.md
View web-security-checklist.md
You can’t perform that action at this time.