Skip to content

Instantly share code, notes, and snippets.

View phocks's full-sized avatar
🦖
"Rrrrrraaaawwwwwr!!" —A dinosaur

Joshua Byrd phocks

🦖
"Rrrrrraaaawwwwwr!!" —A dinosaur
View GitHub Profile
@phocks
phocks / suburb-to-postcode-with-ratio.json
Created March 4, 2024 01:42
Postcodes mapped to Suburb with ratio
This file has been truncated, but you can view the full file.
[
{
"postcode": 800,
"suburb": "Darwin City",
"ratio": 1
},
{
"postcode": 810,
"suburb": "Alawa",
"ratio": 0.0638734
@phocks
phocks / fstab
Created December 29, 2023 22:28
fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p2
UUID=5bb40f73-a2c2-4bf7-84de-7b140a00d0b6 / btrfs rw,relatime,compress=zstd,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@ 0 0
# /dev/nvme0n1p2
UUID=5bb40f73-a2c2-4bf7-84de-7b140a00d0b6 /home btrfs rw,relatime,compress=zstd,ssd,discard=async,space_cache=v2,subvolid=257,subvol=/@home 0 0
@phocks
phocks / nytimes_unpaywall.js
Last active May 13, 2023 11:08
Removes NYTimes Paywall + restores metered content removed by the NYTimes.com JavaScript (run with Tampermonkey)
// ==UserScript==
// @name NYTimes unpaywall
// @namespace phocks
// @version 0.1.2
// @description no subcribe popover to bother reader on nytimes.com
// @author phocks
// @match *://www.nytimes.com/*
// @grant GM_addStyle
// @run-at document-start
// @licence MIT
@phocks
phocks / block-advertisers.js
Last active March 1, 2024 00:41
Paste into console to block advertisers on Twitter
// ==UserScript==
// @name Twitter Advertiser Blocker
// @namespace http://phocks.org
// @version 0.2.0
// @description Blocks advertisers on Twitter as you scroll
// @author @phocks@bne.social
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// @license MIT

Testing!!!

This is just a test.

@phocks
phocks / Welcome file.md
Created April 23, 2021 03:26
Welcome file

Welcome to StackEdit!

Hi! I'm your first Markdown file in StackEdit. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.

Files

StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible offline!

Create files and folders

{
"Darwin City": 800,
"Alawa": 810,
"Brinkin": 810,
"Casuarina (NT)": 810,
"Coconut Grove": 810,
"Jingili": 810,
"Lee Point": 810,
"Lyons (NT)": 810,
"Millner": 810,
@phocks
phocks / rss_proxy.php
Last active July 28, 2020 06:51
PHP rss proxy
<?php
header('Content-Type: application/rss+xml; charset=utf-8');
header("Access-Control-Allow-Origin: *");
$string = file_get_contents("https://www.abc.net.au/news/feed/51120/rss.xml");
echo $string;
var buttons = document.querySelectorAll(".follow_button");
async function doUnfollows() {
for (const button of buttons) {
button.click();
await new Promise(r => setTimeout(r, 500));
}
}
doUnfollows();
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
var buttons = document.querySelectorAll(".follow_button");
buttons.forEach(async button => {
button.click();
await sleep(2000);
});