Skip to content

Instantly share code, notes, and snippets.

View fdebijl's full-sized avatar

Floris de Bijl fdebijl

View GitHub Profile
@fdebijl
fdebijl / keybase.md
Created April 7, 2017 09:37
Keybase Verification

l (https://keybase.io/fdebijl) on keybase.

  • I have a public key ASBhFXwTX-stfe77UeYp4XfxKjXjNiDh2pasLaTD6leifAo

To claim this, I am signing this object:

{
    "body": {
        "key": {
            "eldest_kid": "012061157c135feb2d7deefb51e629e177f12a35e33620e1da96ac2da4c3ea57a27c0a",
@fdebijl
fdebijl / index-unmin.html
Last active February 21, 2018 20:30
Flip-a-coin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Flip a coin</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Inconsolata);
@fdebijl
fdebijl / content.js
Last active February 26, 2018 15:17
ProPublica - content.js
// Reclame's in de tijdlijn zelf hebben deze klasse
const TIMELINE_SELECTOR = ".userContentWrapper";
// Reclame's in de sidebar krijgen deze klasse
const SIDEBAR_SELECTOR = ".ego_unit";
// Deze functie wordt elke vijf seconden uitgevoerd om alle reclames op de
// pagina te versturen naar het achtergrondscript (later meer uitleg hierover)
const sendAds = function() {
let posts = Array.from(document.querySelectorAll(SIDEBAR_SELECTOR)).concat(
Array.from(document.querySelectorAll(TIMELINE_SELECTOR))
@fdebijl
fdebijl / parser.js
Last active February 28, 2018 13:25
ProPublica - parser.js
const timeline = node => {
// Controleer of het element ergens het woord 'Gesponsord' bevat
// zo weten we of het om een advertentie gaat of niet.
const sponsor = checkSponsor(node);
// Als blijkt dat het element geen advertentie is dan wordt deze weggegooid
if (!checkSponsor(node)) return Promise.resolve(false);
// Hier gebeuren twee dingen tegelijkertijd: de functie getTimelineId()
// haalt het ID van de advertentie op en kijkt op wie de advertentie is gericht (stap 3a).
// Ondertussen draait de functie cleanAd() om alle persoonsgegevens uit de advertentie
@fdebijl
fdebijl / cleanad.js
Last active February 28, 2018 13:27
ProPublica - cleanad.js
// Dit zijn alle elementen die persoonsgegevens kunnen bevatten of
// om andere reden niet belangrijk zijn, zoals de like-knop.
const selectors = [
"video",
"input",
"button",
"iframe",
'a[href=""]',
".accessible_elem",
".uiLikePagebutton",
@fdebijl
fdebijl / getTimeLineID.js
Last active February 28, 2018 13:22
ProPublica - getTimeLineID.js
const getTimelineId = (parent, ad) => {
// Om te voorkomen dat de extensie te vaak informatie aanvraagt over
// een advertentie wordt er ook een cache bijgehouden.
if (adCache.has(toggle.id)) return Promise.resolve(adCache.get(toggle.id));
// Hier wordt het ID opgehaald
let promise = new Promise(
parseMenu(
ad,
".uiLayer",
@fdebijl
fdebijl / ad.html
Last active February 26, 2018 22:05
ProPublica - Inhoud verzoek
<div class="_1dwg _1w_m">
<div>
<div class="_5x46 _1yz1 clearfix">
<div class="clearfix _5va3">
<a class="_5pb8 _1yz2 _8o _8s lfloat _ohe" href="https://www.facebook.com/amnestynl/">
<div class="_38vo"><img class="_s0 _4ooo _5xib _44ma _54ru img" src="https://scontent-ams3-1.xx.fbcdn.net/v/t1.0-1/p32x32/20621989_10155394055529961_5532988932518485105_n.png?oh=583c6a640604a1f94c6f935701714af6&oe=5B123389"></div></a>
<div class="clearfix _42ef">
<div class="rfloat _ohf"></div>
<div class="_5va4">
<div>
@fdebijl
fdebijl / Instructions.md
Last active September 6, 2020 11:51
Twitter Like Exporter

WARNING: THIS USER SCRIPT NO LONGER WORKS - IT WAS ORIGINALLY MADE FOR THE TWITTER WEBAPP PRE JULY 2019

Download either Tampermonkey for Chrome, or Greasemonkey for Firefox if you want to run this script repeatably:

Tampermonkey: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

Greasemonkey: https://addons.mozilla.org/nl/firefox/addon/greasemonkey/

Add the script via the dashboard of Tamper/Greasemonkey, and then simply navigate to https://twitter.com/i/likes to download your own likes, or replace 'i' with any other username to download their likes.

@fdebijl
fdebijl / instructions.md
Last active July 11, 2022 14:42
Simon Stålenhag Wallpaper Downloader
@fdebijl
fdebijl / Instructions.md
Last active December 28, 2018 15:35
Blocked Tweet Hider