Skip to content

Instantly share code, notes, and snippets.

View jason-s13r's full-sized avatar

Jason Schwarzenberger jason-s13r

View GitHub Profile
@jason-s13r
jason-s13r / nzta-pin.js
Last active April 27, 2023 09:30
NZTA Toll Road account system has an incredibly stupid PIN criteria system for the username & pin sign in. Generate all possible PINs for the NZTA Toll Road account. There are only 725000 valid PINs available.
const start = new Date();
const characters = 'abcdefghijklnopqrstuvwxyz0123456789';
const valid = new Set();
const invalid = new Set();
for (let a = 0; a < characters.length; a++) {
for (let b = 0; b < characters.length; b++) {
for (let c = 0; c < characters.length; c++) {
for (let d = 0; d < characters.length; d++) {
const word = characters[a] + characters[b] + characters[c] + characters[d];
@jason-s13r
jason-s13r / NZHerald Bypass.md
Last active July 12, 2022 05:01
Bypasses the new NZHerald Premium paywall using Javascript to peek at the LD+JSON Schema to figure out which CSS selector is being used to hide content.

NZHerald Bypass

Bypasses the new NZHerald Premium paywall using Javascript to peek at the LD+JSON Schema to figure out which CSS selector is being used to hide content.

I made this mostly for myself.

Repository

Primary source repository is located on my gogs instance, https://git.1j.nz/firefox-extensions/nzherald-bypass.

@jason-s13r
jason-s13r / Skinny 4G Broadband renewal script.md
Last active February 4, 2022 02:18
Checks the balance to automatically apply daily Data Binge packs. Can be configured to run frequently using a cronjob.

Repository: https://github.com/master5o1/skinny-renewal/

I was looking for options to get better than ADSL internet for my rural house. I had a prepay Skinny 4G Broadband Huawei b315s-608 modem.

I couldn't purchase the 300GB/$59 pack for my address so wondered how I can achieve a reasonable* price for high data usage. Figured out that $5/24 hour unlimited Data Binge would give me a max price of $200 a month.

It would probably only be cost effective if monthly usage were greater than 4x120GB.

@jason-s13r
jason-s13r / Image background remover.md
Last active January 28, 2022 12:37
Remove arbitrary background, resize to square, and add a single-colour background for images in `./input` directory.

A bash script to replace the background with a single colour and resize the image to square.

Uses background remover and ImageMagick.

@jason-s13r
jason-s13r / Old Stuff: Picture Puzzle.md
Last active January 24, 2022 03:45
15 tile picture puzzle game I made a long time ago.

15 tile picture puzzle game I made a long time ago. It was hosted on a file upload website called Omplaoder. This site allowed for rendering HTML files. Was kinda cool.
Demo: https://puzzle.qot.nz/

@jason-s13r
jason-s13r / linked_list.cpp
Created November 1, 2011 06:31
Practising C++ by implementing doubly Linked List clases for the list and the nodes.
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
/* List Node: */
template <class T>
class MyNode {

Keybase proof

I hereby claim:

  • I am jason-s13r on github.
  • I am master5o1 (https://keybase.io/master5o1) on keybase.
  • I have a public key whose fingerprint is 943F 643F 3D22 A79E AB07 85D2 4773 2B7C A17C F5FD

To claim this, I am signing this object:

@jason-s13r
jason-s13r / NZ News Aggregator.md
Last active June 14, 2021 04:53
I have made a news aggregator that uses Declutter to scraper article content.

I have made a news aggregator that uses Declutter to scraper article content.
It is based on a friend's reddit/hackernews/tildes aggregator which he called QotNews.

I extended the feeds to be able to use sitemaps or category pages from arbitrary websites, as well as substack publications. This means that any news site can be brought into the list of articles. I replaced the react client with a ui based on Svelte, because that seemed like a cool thing to do.

@jason-s13r
jason-s13r / practice_list.c
Created October 28, 2011 02:56
Practising C by implementing a simple doubly linked list.
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
struct list_node {
char* name;
int age;
struct list_node* previous;
struct list_node* next;
};
@jason-s13r
jason-s13r / fizzbuzz.js
Last active June 25, 2020 05:28
Displays FizzBuzz without containing the string "Fizz" or "Buzz". Reads the source and extracts the characters from the destructured function parameters. https://jsfiddle.net/master5o1/8ekog4j9/
const GO=( F,i,z,{[z[0 ]]:B},u, zz)=>B((F% u?'':GO[z [u/ u]] ()[z[zz- zz/zz]](u-
u,u **u +zz -zz )[z [u] ](z [zz ],'' )[
z[/* **/ zz- u/u] ](u -u, zz- u/u ))+ (F%
zz?'':GO[z [u/ u]] ()[ z[zz-zz/ zz] ](u -u,u **u
+zz -zz )[z [u] ](z [zz ],'' )[z [zz -u/
u]] (zz -u/ u)) ||F )|| F< zz** u-u **u
+zz -u?GO(F+1,i ,z,i[z[u- zz/zz]],u ,zz):null ;//)[z[z z-u/u]])[ z[zz-u/u]
GO(1,this,['log', 'toString', 'console', 'replace', 'substring', /[^a-z]/gi],console,3,5);