Skip to content

Instantly share code, notes, and snippets.

@FichteFoll
FichteFoll / FichteMarkDown.JSON-tmLanguage
Created April 28, 2012 22:40
Syntax definition file for Sublime Text (in JSON format) of my "own" markdown language
{
"name": "FichteMarkDown",
"scopeName": "text.fmd",
"fileTypes": ["fmd"],
"patterns": [
{
"include": "#inline"
},
{
"include": "#list-heading"
@FichteFoll
FichteFoll / semsel.md
Last active December 18, 2016 15:28
semantic version selectors for https://github.com/mojombo/semver/issues/205

Semantic Version Selectors

A semantic version selector (short: semsel) is a string that can match only onto specific semantic versions (semver). A semsel mainly consists of one or multiple comperators combined with inner logical ANDs and outer ORs.

A complete example could look like this:

>0.0.1-b.1337 <=0.0.2- || 0.0.3 +debug* || ~1.0 || 2.0.x +with* || 2.1.0- - 2.1.1- !2.1.1-b.9 || [3.1,3.3)
export script_name = "Count Layout Lines"
export script_description = "Counts the number of layout lines produced on the canvas per subtitle line."
export script_version = "0.1.0"
export script_author = "line0"
export script_namespace = "l0.CountLayoutLines"
DependencyControl = require "l0.DependencyControl"
depRec = DependencyControl {
feed: "https://raw.githubusercontent.com/TypesettingTools/line0-Aegisub-Scripts/master/DependencyControl.json",
@jbjornson
jbjornson / open_recently_closed_file.py
Last active July 27, 2017 20:35
Plugin that keeps track of which files have been recently closed, as well as files that have been recently accessed. The plugin can be used to simply open the last file you closed or can be used to display a quick panel with a list of recently accessed f
'''
@author Josh Bjornson
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
'''
# Plugin to provide access to the history of accessed files:
# https://gist.github.com/1133602
#
@carstene1ns
carstene1ns / discord-bot-bridge.pl
Last active August 18, 2017 18:05
HexChat plugin to map bot messages in `<nick> message` format to messages coming from nick directly instead
# Name: discord-bot-bridge.pl
# Author: carstene1ns < dev f4ke de >
# Date: 2017-08-04
# License: This code is put in the public domain.
use strict;
use warnings;
use utf8;
use v5.26.0;
use HexChat;
@z411
z411 / trackma_export.py
Last active June 5, 2018 10:02
Trackma MAL XML exporter
#!/usr/bin/env python3
# Short script that loads a Trackma anime list and converts it
# to a MyAnimeList XML file. This way you can import your list
# in sites that support this format.
#
# Usage:
# ./trackma_export.py ~/.trackma/<user>.mal/anime.list
#
# It saves it as mal.xml in the working directory.
@facelessuser
facelessuser / json_strip.py
Last active April 1, 2019 17:28
json_strip
"""
File Strip.
Licensed under MIT
Copyright (c) 2012 - 2019 Isaac Muse <isaacmuse@gmail.com>
"""
import re
LINE_PRESERVE = re.compile(r"\r?\n", re.MULTILINE)
JSON_COMMENTS_PATTERN = re.compile(
@StepS-
StepS- / twitch.py
Last active October 14, 2019 14:04
import hexchat
__module_name__ = 'Twitch'
__module_author__ = 'TingPing, frumpy4, StepS'
__module_version__ = '6.8'
__module_description__ = 'Better integration with Twitch.tv'
# Commands from http://help.twitch.tv/customer/portal/articles/659095-chat-moderation-commands
# Enable the "commands" and "membership" caps for the best effect
# See https://github.com/justintv/Twitch-API/blob/master/chat/capabilities.md for an up-to-date list.
sampler s0 : register(s0);
#define const_1 ( 16.0 / 235.0)
#define const_2 (235.0 / 219.0)
float4 main(float2 tex : TEXCOORD0) : COLOR
{
// original pixel
float4 c0 = tex2D(s0, tex);
@kageru
kageru / README.md
Last active March 31, 2022 12:03
Standalone script using Vapoursynth to determine the original resolution of scaled images or videos.

This version is deprecated

I’ve stopped updating this a while ago because some people made a proper respository with a few necessary fixes and changes. Just get this version from now on: https://github.com/Infiziert90/getnative