Skip to content

Instantly share code, notes, and snippets.

View mtvillwock's full-sized avatar

Matthew Villwock mtvillwock

View GitHub Profile

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
#take array of items, use hash table to look up prices and return prices as a float
def get_amount(items)
total = 0.00
prices = {
"taco" => 6.00,
"burrito" => 7.00,
"coke" => 1.25,
"iced" => 1.50
}
@cookiengineer
cookiengineer / console-polyfill.js
Last active August 25, 2021 15:06
A better console API for node.js, with support for all data types and pretty-printing using shell color codes
(function() {
let _std_out = '';
let _std_err = '';
/*
* HELPERS
@bshishov
bshishov / forecasting_metrics.py
Last active July 19, 2024 18:17
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@justsml
justsml / fetch-api-examples.md
Last active July 8, 2024 17:26
JavaScript Fetch API Examples
#!/bin/sh
# Set up Rails app. Run this script immediately after cloning the codebase.
# Exit if any subcommand fails
set -e
# Copy over configs
if ! [ -f .env ]; then
cp .sample.env .env
@mtvillwock
mtvillwock / Gemfile
Created January 19, 2017 05:46 — forked from iamvery/Gemfile
source "https://rubygems.org"
gem "gnuplot"
gem "highline"
@crizstian
crizstian / solid.js
Last active March 15, 2023 02:40
Code examples of SOLID principles for JavaScript
/*
Code examples from the article: S.O.L.I.D The first 5 priciples of Object Oriented Design with JavaScript
https://medium.com/@cramirez92/s-o-l-i-d-the-first-5-priciples-of-object-oriented-design-with-javascript-790f6ac9b9fa#.7uj4n7rsa
*/
const shapeInterface = (state) => ({
type: 'shapeInterface',
area: () => state.area(state)
})
@zeuxisoo
zeuxisoo / guess-number.go
Last active September 25, 2019 21:42
A simple program ask user to guess the number
package main
import (
"os"
"fmt"
"bufio"
"strings"
"strconv"
"time"
"math/rand"