Skip to content

Instantly share code, notes, and snippets.

View FiXato's full-sized avatar

Filip H.F. "FiXato" Slagter FiXato

View GitHub Profile
@FiXato
FiXato / moonblaster_recorder.tcl
Created March 27, 2010 00:57
openMSX script for recording video/audio of MoonBlaster tracks running via openMSX.
# TCL plugin script for openMSX Emulator
# Used to record MoonBlaster MBWave 1.16 tracks running through openMSX, in WAV and AVI.
# Version 0.9.5
#
# Changelog:
# 0.9.5 No need for global; variable will do;
# 0.9.4 Dual-licensed this script with GPL 2.0 for inclusion with openMSX;
# Bugfix: releasing the automatically pressed keys;
# Added: automatically stopping playback of song.
# 0.9.3 Updated documentation;
@FiXato
FiXato / vblank.tcl
Created July 14, 2010 17:51
TCL plugin script for openMSX Emulator to record a video of MSX software that makes use of switching frame rate frequencies.
# TCL plugin script for openMSX Emulator
# by Albert "BiFiMSX" Beevendorp and Filip H.F. "FiXato" Slagter
# Used to record a video of MSX software that makes use of switching frame rate frequencies.
# Version 0.7
#
# `toggle_vblank` enables/disables auto-'splitting' of videos at the frame rate change.
# `record_with_vblank` is a wrapper that enables the vblank detection, and allows for
# passing along `record start` parameters such as -prefix and -doublesize.
# It automatically starts the video recording and will stop and start recording a new video when
# the frame rate change is detected.
@FiXato
FiXato / fliptext.rb
Last active March 1, 2017 23:34
A simple ruby script to 'flip' text using Unicode equivalents. Also see https://gist.github.com/FiXato/4969073 for Mathematical glyph support.
#!/usr/bin/env ruby
# encoding: utf-8
# A simple ruby script to 'flip' text using Unicode equivalents
# Based on the javascript code from http://www.revfad.com/flip.html
# TODO: also implement reverse lookup table.
class String
def each(&block)
(0...self.size).each do |idx|
block.call(self[idx,1])
end
@FiXato
FiXato / iframe_builder.php
Created September 9, 2010 06:35
Simple function to return object or iframe code, based on HTTP_ACCEPT
<?php
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml");
}
else {
header("Content-type: text/html");
}
function iFrameBuild($id,$src)
{
@FiXato
FiXato / nzbmatrix_watchlist_mail2rss.rb
Created November 3, 2010 20:09 — forked from anonymous/nzbmatrix_watchlist_mail2rss.rb
Simple IMAP parser script that looks for NZBMatrix Watchlist mails and converts them to an RSS feed and downloads the NZBs.
#!/usr/bin/env ruby
# Simple IMAP parser script that looks for NZBMatrix Watchlist mails and converts them to an RSS feed and downloads the NZBs.
# Created by request of third party.
#
# LICENSE:
# Copyright 2010 Filip H.F. 'FiXato' Slagter
# You may use this work without restrictions, as long as this notice is included.
# The work is provided "as is" without warranty of any kind, neither express nor implied.
require 'net/imap'
require 'rss/maker'
@FiXato
FiXato / stopforumspam_parser.php
Created December 5, 2010 19:31
A very simple PoC parser for Chat4All to verify IPs against the stopforumspam database.
<?php
$input_file = "listed_ip_180.txt";
$ips = explode("\n",file_get_contents($input_file));
foreach(array("127.0.0.1","127.0.0.2") as $ip) {
echo "Checking if IP $ip occurs in file $input_file" . PHP_EOL;
if(in_array($ip,$ips)) {
echo "$ip occurs" . PHP_EOL;
} else {
echo "$ip not present" . PHP_EOL;
}
@FiXato
FiXato / flood.pm.diff
Created December 13, 2010 04:00
Diff file for IRC Defender's flood module. Adds exclusion channel support. Based on 1.40 bl.
1c1
< # $Id: flood.pm 861 2004-11-24 11:30:33Z brain/FiXato $
---
> # $Id: flood.pm 861 2004-11-24 11:30:33Z brain $
21,29d20
< my $excluded_channel;
< my $excluded;
< my @excluded_channels;
< my $total_excluded;
<
@FiXato
FiXato / parse_unreal_ips_conf.rb
Created December 15, 2010 01:59
A simple prototype script to parse the unrealircd ip.conf file.
#!/usr/bin/env ruby
#Simple mockup script for Chat4All to parse the UnrealIRCd ip.conf file which holds the 'ban ip'-blocks.
#LICENSE:
#Copyright 2010 Filip H.F. "FiXato" Slagter
#You may use this work without restrictions, as long as this notice is included.
#The work is provided "as is" without warranty of any kind, neither express nor implied.
# Get the lines from the Unreal ban ips.conf file. Strip leading and trailing whitespaces and repeated spaces.
# Compact so there are no empty lines / nil lines left in the array.
filepath = File.expand_path("~/script_resources/ips.conf")
@FiXato
FiXato / create_certs.sh
Created September 13, 2011 21:48
Certificate and Certificate Authority creation tool (for UnrealIRCd)
#!/bin/bash
CERT_DIR=~/certificates
PRIVATE_DIR=$CERT_DIR/private
PUBLIC_DIR=$CERT_DIR/public
PUBLIC_CA=$PUBLIC_DIR/ca.cert.pem
PRIVATE_CA=$PRIVATE_DIR/ca.key.pem
PRIVATE_SERVER_KEY=$PRIVATE_DIR/secure.server.key.pem
PRIVATE_SERVER_KEY_PASSWORDLESS=$PRIVATE_DIR/server.key.pem
PRIVATE_SERVER_CSR=$PRIVATE_DIR/server.req.pem
PUBLIC_SERVER_CERT=$PUBLIC_DIR/server.cert.pem
@FiXato
FiXato / GPlusNicks.user.js
Created September 22, 2011 18:20
Proof of Concept UserJS script to add nicknames to Google+
// ==UserScript==
// @name G+ Nicks
// @namespace https://plus.google.com/
// @description Proof of concept script to add nicknames to usernames on G+
// @include https://plus.google.com/*
// ==/UserScript==
anchors = document.getElementsByClassName('yn');
function add_nickname(oid, username) {