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 / weebots.rb
Last active December 16, 2015 09:48 — forked from UnknownEntity634/weebots.rb
WeeChat script to parse BotServ Botlists to find out which bots are no longer in use.
#!/usr/bin/env ruby
# encoding: utf-8
#
# A WeeChat script to parse Anope's BotServ BOTLIST into a sorted list,
# so you can more easily find unassigned BotServ bots.
#
# Code by Unknown Entity (aka o_o aka Flaming Nutmeg) and Filip H.F. "FiXato" Slagter
# Based on the code by Unknown Entity
#
# Type /parsebotlist and go get some noms depending on bot list length while it collects info.
@FiXato
FiXato / Scripts.rvdata2-exporter.rb
Last active February 15, 2025 15:38 — forked from hirataya/rvdata2_dump.rb
Script to export the scripts inside the Scripts.rvdata2 data file to Data/exported_scripts as plain text Ruby files. If you run this script from inside RPG Maker VX Ace, I would suggest creating the Data/exported_scripts folder yourself as RGSS3 doesn't seem to support requiring FileUtils. Based on HIRATA Yasuyuki / 平田 泰行's rvdata2_dump.rb script:
#! /usr/bin/env ruby
# encoding: utf-8
#
# Script to export the scripts inside the Scripts.rvdata2 data file to Data/exported_scripts as plain text Ruby files.
# If you run this script from inside RPG Maker VX Ace, I would suggest creating the Data/exported_scripts folder yourself
# as RGSS3 doesn't seem to support requiring FileUtils.
# Based on HIRATA Yasuyuki / 平田 泰行's rvdata2_dump.rb script: https://gist.github.com/hirataya/1853033
begin
require 'fileutils'
rescue LoadError
@FiXato
FiXato / RPG-Battlesystem-ideas.md
Last active December 15, 2015 14:09
Generic RPG notes based on previous RPGs I've played throughout the years. Things I liked or didn't like in those games, as well as notes of what I might implement in a game of my own.

Battle System:

These ideas probably will require quite a rewrite of the current battle system. It'll probably be left for last. Weapons will need several notetags I guess:

Notetags

  • weapon:melee
  • weapon:ranged
  • weapon:rangedmelee (spear)
@FiXato
FiXato / mathtext.rb
Last active December 13, 2015 20:18
Inspired by fliptext.rb (https://gist.github.com/FiXato/525297) and Sai's post on G+ https://plus.google.com/u/0/103112149634414554669/posts/V7zxyRYg2EB which mentioned Fraktur symbols in Unicode.
#!/usr/bin/env ruby
# encoding: utf-8
# MathText
#Inspired by fliptext.rb (https://gist.github.com/FiXato/525297) and Sai's post on G+ https://plus.google.com/u/0/103112149634414554669/posts/V7zxyRYg2EB which mentioned Fraktur symbols in Unicode.
begin
# Hack to prevent useless iconv warning from showing up in 1.9
oldverb = $VERBOSE; $VERBOSE = nil
require 'iconv'
$VERBOSE = oldverb
@FiXato
FiXato / awesomeface.irc
Created January 30, 2013 01:34
Various IRC graphics to be used with /shell -o cat /path/to/textfile
0,10,1511,11█████████████1,1████████████████████11,11██████████████0,1
0,10,1512,12██████████1,1███8,8████████████████████1,1████12,12██████████0,1
0,10,1511,11████████1,1██8,8███████████████████████████1,1██11,11████████0,1
0,10,1512,12███████1,1█8,8███████████████████████████████1,1█12,12███████0,1
0,10,1511,11██████1,1█8,8██1,1████████8,8█████████1,1████████8,8██████1,1█11,11██████0,1
0,10,1512,12██████1,1█8,8█1,1█0,0█████1,1████8,8███████1,1█0,0█████1,1████8,8█████1,1█12,12██████0,1
0,10,1511,11█████1,1█8,8██1,1█0,0█████1,1█████8,8█████1,1█0,0██████1,1█████8,8█████1,1█11,11█████0,1
0,10,1512,12█████1,1█8,8██1,1█0,0█████████1,1█8,8█████1,1█0,0██████████1,1█8,8█████1,1█12,12█████0,1
0,10,1511,11████1,1█8,8████1,1█████████8,8███████1,1██████████8,8███████1,1█11,11████0,1
0,10,1512,12████1,1█8,8█████████████████████████████████████1,1█12,12████0,1
@FiXato
FiXato / Handy CSS Snippets.css
Last active December 11, 2015 20:59
Handy Ruby and CSS Snippets
/* Put the href of all anchors after each link. Useful for print stylesheets. */
a:after {content: attr(href);}
/* Get a scrollbar on the left side */
#nav {max-height:150px; width: 100%; overflow: auto; direction: rtl;}
#nav * {direction: ltr}
/* Nicer looking blockquotes */
blockquote {margin-left: 1em;margin-bottom: 1em; border: 1px solid #666; max-width: 800px;}
/* Including nicer quotation marks */
@FiXato
FiXato / MysteryHunt-matcher.rb
Created January 28, 2013 21:42
Something for Unknown_Entity aka o_o
#!/usr/bin/env ruby
#encoding: utf-8
msgs = [
"[1-7] Porto Mojada: Foxtrot Tango [Work your alphabets]",
"[SOLVED: TATTOO] [1-9] Topless Beach: Boxstep [Gathering Data. Keyword: Boxing]",
"[SOLVED: SYLVESTER] [2-2] Video Store: Harold's Puzzle"
]
regexp = /(\[SOLVED: (?<solution>.+?)\] )?\[(?<num1>\d+)(-(?<num2>\d+))?\] (?<title>.+?)( \[(?<hint>.+?)\])?\z/
msgs.each{|msg| puts msg.match(regexp).inspect}
@FiXato
FiXato / ansinator.rb
Last active December 11, 2015 20:49
A bit of an updated version of my ansinator script. Should toss it in a proper repo.
#!/usr/bin/env ruby
# encoding: utf-8
# Based on the 'colors' zsh script I found online somewhere years ago.
# It looks like it is based on works posted at http://crunchbanglinux.org/forums/topic/13645/ansi-colorschemes-scripts/page/2/
# I've basically just edited it a bit to work with IRC control codes as well.
# ~~Filip H.F. "FiXato" Slagter, 2012
abort("You need at least Ruby 1.9 to run this script due to encoding issues") if RUBY_VERSION < '1.9'
class String
def center(str_length)
delta = str_length - self.length
@FiXato
FiXato / openMSX install instructions.sh
Last active December 11, 2015 19:48
Tools which help with installing and updating openMSX from SVN on Linux.
sudo apt-get install subversion
sudo apt-get build-dep openmsx
mkdir ~/bin
echo '#!/bin/bash' > ~/bin/update_openmsx
echo '[ ! -d ~/openmsx ] && cd ~/ && svn co https://openmsx.svn.sourceforge.net/svnroot/openmsx/openmsx/trunk openMSX' >> ~/bin/update_openmsx
echo "cd ~/openMSX && svn up && ./configure && make && sudo make install" >> ~/bin/update_openmsx && chmod +x ~/bin/update_openmsx
~/bin/update_openmsx
@FiXato
FiXato / alias.conf
Last active December 11, 2015 06:28
2 aliases to test how plain foreground and background colours look in WeeChat.
colours-all-1 = "/input insert ,00 [ ] 00 00 (white) ,01 [ ] 01 01 (black) ,02 [ ] 02 02 (navyblue) ,03 [ ] 03 03 (green)"
colours-all-2 = "/input insert ,04 [ ] 04 04 (red) ,05 [ ] 05 05 (maroonbrown) ,06 [ ] 06 06 (purple) ,07 [ ] 07 07 (oliveorange)"
colours-all-3 = "/input insert ,08 [ ] 08 08 (yellow) ,09 [ ] 09 09 (limegreen) ,10 [ ] 10 10 (teal/greenbluecyan) ,11 [ ] 11 11 (lightcyan/aqua)"
colours-all-4 = "/input insert ,12 [ ] 12 12 (royal/lightblue) ,13 [ ] 13 13 (fuchsia) ,14 [ ] 14 14 (grey) ,15 [ ] 15 15 (lightgrey/silver)"