Skip to content

Instantly share code, notes, and snippets.

@cruvolo
cruvolo / nj-municipal-covid19cases-percapita.csv
Last active April 15, 2020 14:01
New Jersey Covid 19 cases per capita
County Municipality Cases Deaths Population Cases per 10k population
Bergen Teterboro 2 69 289.9
Monmouth Deal 19 733 259.2
Passaic Prospect Park 80 5964 134.1
Bergen Bergenfield 357 27061 131.9
Bergen Teaneck 540 41311 130.7
Bergen Moonachie 36 2800 128.6
Bergen Englewood 350 27927 125.3
Bergen South Hackensack 29 2492 116.4
Hudson North Bergen 717 63659 112.6
@scarlac
scarlac / purge_advertisers.md
Last active June 7, 2021 09:36
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers and Businesses” / "Who uploaded a list with your info and advertised to it":

  1. Go to https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen and open the section "Advertisers you've interacted with"
  2. Collapse all sections but keep "Advertisers and Businesses" open
  3. Open Web Inspector
  4. Copy-paste this script to load all advertisers: smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? x.click() : clearInterval(smt), console.log('done')}, 1000)
  5. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  6. Copy-paste this and press enter:
@ehedaya
ehedaya / sort_for_duplicates.sh
Last active March 23, 2019 14:37
Simple script to go through all the files in a folder and move any that are identical to a "duplicates" folder. Identical is defined as having the same md5 hash. I used this to save space in a folder that had multiple copies of the same video clips I shot on my iPhone.
# Make a directory to hold any duplicates we find; this may result in "directory already exists" if running a second time.
mkdir duplicates
# Create an empty log file to hold hashes so we know which files we have seen before
log=/tmp/md5copylog-`date +%s`.log
touch $log
# For any file (can change this to *.MOV to do just .MOV files, for example)
for f in *.*;
do
@danhyun
danhyun / ssh config
Last active December 14, 2015 00:09
set up ssh config
[root][henry][~]
$ cd ~/.ssh
[root][henry][~/.ssh]
$ ll -tr config
-rw-r--r-- 1 root root 143 2012-10-04 13:06 config
# note the permissions -> user:group [644]
[root][henry][~/.ssh]
$ cat config
@colmdoyle
colmdoyle / nukeTestUsers.php
Created June 1, 2011 16:39
A script to remove all test users associated with your Facebook Platform Application
<?php
// jSON URL which should be requested
$json_url = 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?access_token=YOUR_APP_ID|YOUR_APP_SECRET';
// Initializing curl
$ch = curl_init( $json_url );
// Configuring curl options
$options = array(