Skip to content

Instantly share code, notes, and snippets.

View davidsonsns's full-sized avatar
🎯
Focusing

Davidson Nascimento davidsonsns

🎯
Focusing
  • San Diego, CA
View GitHub Profile
@davidsonsns
davidsonsns / git-update-fork.sh
Created October 24, 2017 00:02 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@davidsonsns
davidsonsns / NotificationSequence
Last active July 20, 2017 17:49
HTML 5 Notification in sequence
function NotificationSequence() {
const notifications = []
const showNotifications = (notification) => {
Notification.requestPermission(function (permission) {
const n = new Notification(notification.title, notification)
setTimeout(() => {
n.close()
notifications.pop()
if (notifications.length) {
showNotifications(notifications[notifications.length - 1])
function draftToText(obj) {
return new Promise((resolve, reject) => {
try {
const draftObj = typeof obj === 'string' ? JSON.parse(obj) : obj;
const completText = [];
for (let index = 0; index < draftObj.blocks.length; index++) {
completText.push(obj.blocks[index].text.trim());
}
resolve(completText.join(' '));
} catch (error) {
@davidsonsns
davidsonsns / whatsapp_phone_enumerator_floated_div.js
Created July 14, 2017 10:43
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/****** I've created a Chrome extension from this script, take a look at https://github.com/LoranKloeze/WhatsAllApp ********/
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part