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 / closing browser window without confirmation dialog
Created Nov 26, 2012
javascript close window browser noconfirmation noalert
View closing browser window without confirmation dialog
<!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 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'; })();
@lfreneda
lfreneda / index.js
Last active Feb 14, 2020
Field Control API
View index.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;
});
@lfreneda
lfreneda / instagram auto follow
Last active May 16, 2019
instagram auto follow
View 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');
}
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);
});
You can’t perform that action at this time.