Skip to content

Instantly share code, notes, and snippets.

View kav2k's full-sized avatar

Alexander Kashev kav2k

  • DSL, University of Bern
  • Bern, Switzerland
  • X @kav2k
View GitHub Profile
@kav2k
kav2k / g3sub.pl
Last active December 29, 2015 06:09
Gamers 3 subtitle translation converter. Usage: 1) Download the worksheet as plain text (will result in a TSV, Tab-Separated Values file) 2) Feed the file, with the column name containing the required language, to the script, example: `perl g3sub.pl E < worksheet.tsv > subtitles.srt` will produce English subtitles
#!perl -w
#
# Gamers 3 Subtitle File processing
# (c) Alexander Kashev, 2013
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU
@kav2k
kav2k / godville_chat_fix.css
Created April 29, 2013 14:17
CSS file for Godville chat fix
.fr_msg_l { white-space:normal !important; }
@kav2k
kav2k / godville_firefox.user.js
Created April 29, 2013 13:13
A quick'n'dirty fix for current chat CSS problems at godville.net (Firefox version)
// ==UserScript==
// @name Godville chat fix (Firefox)
// @version 1.1
// @namespace tag:Xanos
// @description Fixes wraparound in Godville chat
// @include http://godville.net/*
// @include https://godville.net/*
// @grant GM_addStyle
// ==/UserScript==
@kav2k
kav2k / godville.user.js
Last active June 7, 2016 13:07
A quick'n'dirty fix for current chat CSS problems at godville.net (Chrome)
// ==UserScript==
// @name Godville chat fix (Chrome)
// @version 1.1
// @namespace tag:Xanos
// @description Fixes wraparound in Godville chat
// @include http://godville.net/*
// @include https://godville.net/*
// ==/UserScript==
document.styleSheets[0].insertRule('.fr_msg_l { white-space:normal !important; }', 0);
#include <stdio.h>
#include <stdlib.h>
#define s(_)sizeof(_)
#define n void*
#define z(_)_,_,_
#define x (s*)__
#define y (s*)_
#define h C(y,y)
#define o &d
#define t() (p)
for(int y = 0; y < 13; ++y)
{
for(int x = 0; x < 13; ++x)
{
Uint8 pixelOffset = _ufoTopView->getPixel(x, y);
if(pixelOffset == 0)
{
continue;
}
else