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:
@mtvillwock
mtvillwock / unknown-query-error-refetchQueries-graphql-apollo-client.md
Last active February 6, 2024 18:27
Fixing unknown query requested in refetchQueries option.includes array in GraphQL Apollo client

Fixing "unknown query requested in refetchQueries option.includes array" in GraphQL Apollo client

Situation

You're writing tests for a component that uses Apollo client. Sometimes you'll see incredibly long error messages which link you to the Apollo Client docs where the error is shown in greater detail. Ideally, you'd just get the proper message in your terminal, but this is not enabled by default. To get this working, add this to your specHelper.js file.

// Adds Apollo GraphQL messages only in a dev environment
@mtvillwock
mtvillwock / gist:33d23a57f25d68ffde182f7117eb154d
Created August 25, 2019 05:17 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@mtvillwock
mtvillwock / postgres-what.txt
Created July 19, 2019 19:06
Can't uninstall postgres
shape [1925-respondents-unable-to-add-their-email] :> ps aux | grep postgres
mvillwock 36557 0.0 0.0 4296440 976 s003 S+ 12:04PM 0:00.01 grep postgres
shape [1925-respondents-unable-to-add-their-email] :> which psql
shape [1925-respondents-unable-to-add-their-email] :> which postgres
shape [1925-respondents-unable-to-add-their-email] :> brew list postgres
Error: No such keg: /usr/local/Cellar/postgresql
shape [1925-respondents-unable-to-add-their-email] :> brew list version
Error: No such keg: /usr/local/Cellar/version
shape [1925-respondents-unable-to-add-their-email] :> brew list
adns gmp libgcrypt msgpack postgresql@10
@mtvillwock
mtvillwock / hosts
Last active March 13, 2019 23:37 — forked from pamelafox/hosts
etc/hosts for news blocking
### News Aggregators
127.0.0.1 redditate.com
127.0.0.1 news.google.com
127.0.0.1 news.yahoo.com
127.0.0.1 news.ycombinator.com
### News
127.0.0.1 disqus.com # for blocking comments
127.0.0.1 buzzfeed.com
127.0.0.1 lifehacker.com
@mtvillwock
mtvillwock / about.md
Last active February 1, 2018 22:07 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@mtvillwock
mtvillwock / bullshit.js
Created July 26, 2017 19:22 — forked from raydog/bullshit.js
Bullshit as a Service
var E_PREFIX_RATE = 0.25;
// All of our word lists:
var _word_lists = {
verb : [
"implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace",
"enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize",
"morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate",
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}
@mtvillwock
mtvillwock / Locales.yaml
Created January 20, 2017 00:20 — forked from wojtha/Locales.yaml
config.exceptions_app and ExceptionController
# config/locales/en.yml
en:
exception:
show:
not_found:
title: "Not Found"
description: "The page you were looking for does not exists."
internal_server_error:
title: "Internal Server Error"
@mtvillwock
mtvillwock / Gemfile
Created January 19, 2017 05:46 — forked from iamvery/Gemfile
source "https://rubygems.org"
gem "gnuplot"
gem "highline"