Skip to content

Instantly share code, notes, and snippets.

View RobThree's full-sized avatar
🤙
Being awesome

Rob Janssen RobThree

🤙
Being awesome
View GitHub Profile
@RobThree
RobThree / wavefilereader.class.php
Created August 29, 2012 17:22
PHP WAVE file reader / parser
<?php
/**
* WaveFileReader; a simple class to read/parse WAVE file
* (c)2012 Rob Janssen / https://github.com/RobThree
*
* Based on https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
*
* USAGE:
*
* $wav = WaveFileReader::ReadFile('/path/to/test.wav');
@RobThree
RobThree / gist:b7ee02338024beb7a2fbfd14e9a060b2
Last active April 11, 2025 01:00
My AdBlock Plus custom filters
[Adblock Plus 2.0]
! Version:
! Title: RobIII's filters
! Last modified: 2025-04-11
! Expires: 1 hours (update frequency)
! Homepage: https://robiii.me
!
9gag.com###overlay-container
9gag.com###sidebar
9gag.com##.badge-sticky-button
@RobThree
RobThree / Readme.md
Last active March 25, 2025 01:42
OWON BIN file Format

This content has moved. Go here for the latest version.

@RobThree
RobThree / 01-program.cs
Last active March 25, 2025 01:37
See Isha Fatima's post "Replace Multiple if-else with a Dictionary for Cleaner Code!": https://www.linkedin.com/posts/ishafatima1907_csharp-dotnet-cleancode-activity-7308759297859948545-SKut (archived: https://archive.is/zKfwv)
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace IshaFatima;
internal class Program
{
private static void Main(string[] args)
{
var summary = BenchmarkRunner.Run<RoleBenchmark>();
@RobThree
RobThree / download.rb
Last active December 5, 2024 11:56
Download House M.D. Transcripts
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
INDEX_PAGE = "https://clinic-duty.livejournal.com/12225.html"
# Use URI.open for URLs
(URI.open(INDEX_PAGE) { |f| Nokogiri::HTML(f) }/"table > tbody > tr > td > a").each do |a|
@RobThree
RobThree / gitlab-checkandnotify
Last active November 21, 2023 18:00
gitlab version checker & notifier
#!/bin/bash
#mail recipient
RCPT=someone@gmail.com
#args: $rcpt $subject $text
sendnotification() {
echo -e "$3" | mail -s "$2" -t $1
}
echo -n "Checking version: "
@RobThree
RobThree / gameconsole.cs
Created October 17, 2017 08:42
OneLoneCoder GameConsole inspired C# version; work in progress and not a 1:1 conversion. API differs, tried to stay more close to dotnet best practices.
using Microsoft.Win32.SafeHandles;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
namespace ConsoleEngine
{
@RobThree
RobThree / index.php
Last active August 2, 2023 12:56
Pihole OISD.nl caching proxy PHP script
<?php
$fileroot = './cache/'; // Where to store files
$ttl = 3600; // Number of seconds to cache a file
$fileext = '.gz'; // File extension
$lists = [ // Known lists
'small' => 'https://small.oisd.nl/',
'big' => 'https://big.oisd.nl/',
'nsfw' => 'https://nsfw.oisd.nl/'
];
@RobThree
RobThree / program.cs
Last active June 14, 2023 23:47
Calculate number of subnets of a given size you can 'create' or 'take' or 'extract' from a given network.
using System;
public class Program
{
public static void Main()
{
// Example: How many /30's can we fit in a /28?
var sourcePrefixLength = 28;
var destinationPrefixLength = 30;