Skip to content

Instantly share code, notes, and snippets.

View jtojnar's full-sized avatar

Jan Tojnar jtojnar

  • ogion.cz
  • Czech Republic
View GitHub Profile
@jtojnar
jtojnar / PlayerListener.java
Created September 24, 2011 20:31
UltraItems
package cz.ogion.ultraitems;
import java.util.Map;
import org.bukkit.entity.Player;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.config.ConfigurationNode;
import org.getspout.spoutapi.SpoutManager;
@jtojnar
jtojnar / gist:1240056
Created September 25, 2011 00:42
Delphi assembly
//0048EE8C
procedure TOknoRodice.btPrihlasitClick;
begin
{*
0048EE8C push ebp
@jtojnar
jtojnar / gist:1240887
Created September 25, 2011 17:47
0048E004
//0048E004
//function sub_0048E004(?:TOknoRodice; ?:?; ?:TFileName; ?:?):?;
//begin
{*
0048E004 push ebp
@jtojnar
jtojnar / MainMovie.as
Created February 15, 2013 21:05
Generování mapy
// Action script...
// [onClipEvent of sprite 114 in frame 4]
onClipEvent (enterFrame) {
if (_parent._parent.cloudMoveX == true) {
this._x = this._x - _parent._parent.cloudSpeed;
} // end if
if (_parent._parent.cloudMoveY == true) {
this._y = this._y - _parent._parent.yMove * 0.500000;
} // end if
@jtojnar
jtojnar / linter.md
Last active December 18, 2015 22:08

This is no longer maintained. Please check my fork.

I wanted SublimeLinter to automatically validate XML against XSD, but this AFAIK isn’t possible so I made a wrapper for xmllint utility to find XSD file in source code and pass it as argument to xmllint. Because XSD paths can be relative I had to change xml.py to use INPUT_METHOD_FILE (@ instead od -) so I could detect file path. Currently the wrapper is quite stupid but it can be changed when I come across something that doesn’t work.

Tested with SublimeLinter3, libxml version 20902 and Python 3.4.3

Save xmllintschema to ~/bin directory (or another directory on path) and set executable bit (chmod +x xmllintschema).

  1. Click PreferencesBrowse Packages → SublimeLinter-xmllint, open linter.py
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (3.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
@jtojnar
jtojnar / gist:8903976
Created February 9, 2014 18:38
Kobo Aura HD UA string (Firmware 3.1.1, 12/11/13)
Mozilla/5.0 (Linux; U; Android 2.0; en-us;) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Kobo Touch)
@jtojnar
jtojnar / full.onboard
Created March 27, 2014 22:59
Onboard layout – full with numeric block
<?xml version="1.0" ?>
<keyboard format="3.1" id="full">
<include file="key_defs.xml"/>
<box border="1" orientation="vertical" spacing="3">
<!--- word suggestions -->
<panel filename="full.svg" scan_priority="1">
<include file="word_suggestions.xml"/>
</panel>
<box spacing="3">
<!--- keyboard, multiple layers -->
<?php
class ParsedownDetails extends ParsedownExtra {
function __construct() {
$this->BlockTypes['¡'][] = 'Details';
parent::__construct();
}
// Details
protected function blockDetails($Line) {