Skip to content

Instantly share code, notes, and snippets.

View lfreneda's full-sized avatar
💙
Always deliver more than expected.

Luiz Freneda lfreneda

💙
Always deliver more than expected.
View GitHub Profile
@lfreneda
lfreneda / instagram auto follow
Last active June 6, 2021 04:13
instagram auto follow
var index = 0;
var buttons = null;
var scrollCount = 0;
var followedCount = 0;
function clickAndWait() {
if (buttons === null) {
buttons = document.querySelectorAll('li button');
}
@lfreneda
lfreneda / closing browser window without confirmation dialog
Created November 26, 2012 13:20
javascript close window browser noconfirmation noalert
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Operação completa</title>
<script language="javascript" type="text/javascript">
function closeWindow() {
window.open('', '_self', '');
window.close();
}
</script>
@lfreneda
lfreneda / colors.md
Last active March 21, 2020 16:08 — forked from irisli/colors.md
Github Flavored Markdown (GFM) Colored text
- 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 February 14, 2020 11:35
documentação-materiais.md
(function() { window.location = 'https://developers.fieldcontrol.com.br/#api-field-control'; })();
@lfreneda
lfreneda / index.js
Last active February 14, 2020 11:30
Field Control API
(function() { window.location = 'https://developers.fieldcontrol.com.br/#api-field-control'; })();
@lfreneda
lfreneda / mocking_http_angularjs
Created December 19, 2019 13:45
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;
});
@lfreneda
lfreneda / create_cloudfront_invalidation.js
Created January 2, 2019 15:57
Create Cloudfront Invalidation
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()
@lfreneda
lfreneda / pushNotificatonService.js
Created December 4, 2018 11:23
Push Notification Service
import { Injectable } from '@angular/core';
import {
Platform,
AlertController
} from 'ionic-angular';
import {
Push,
PushObject
} from '@ionic-native/push';
@lfreneda
lfreneda / naming-meh.js
Created October 22, 2018 01:27
Waaaaaaat is this working?!!
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 January 20, 2018 15:05
getting all startup quote images :P
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);
});