Skip to content

Instantly share code, notes, and snippets.

@patthoyts
patthoyts / tclchat.lua
Created October 17, 2020 14:11
Hexchat plugin for #tcl on freenode to fixup the nicks comin from the IRC bridges
-- Script to fixup the nicks posted by the Jabber bridge on
-- the #tcl and #tcltest IRC channels.
--
local name = "tclchat"
local desc = "Fixup messages from the Jabber bridge on #tcl"
local version = "0.2"
hexchat.register(name, version, desc)
@patthoyts
patthoyts / notepad.tcl
Last active August 29, 2015 14:06
Notepad clone with unix/dos line-ending detection.
#!/usr/bin/env wish
#
# Copyright (c) 2012-2014 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# A Tk based clone of notepad with Unix or Windows line ending detection and
# byte-order-mark (BOM) handling.
#
package require Tk 8.5
variable UID
@patthoyts
patthoyts / gist:8787532
Created February 3, 2014 16:48
Tkinter binary clock example
from Tkinter import *
import sys,time
class App():
def __init__(self, parent):
parent.title("Title")
parent.geometry("500x500")
self.labels = []
self.parent = parent
x,y = 50,50
@patthoyts
patthoyts / git-wrapper.c
Created June 27, 2012 09:41
mysGit git wrapper code to replace git.cmd with an equivalent exe.
/*
* git-wrapper - replace cmd\git.cmd with an executable
*
* Copyright (C) 2012 Pat Thoyts <patthoyts@users.sourceforge.net>
*
* Note: Just for fun, this avoids linking to any C run-time with MSVC
* Compile:
* cl -nologo -W3 -Ox -GS- git-wrapper.c -link -subsystem:console -release
* -nodefaultlib -entry:wmain kernel32.lib shlwapi.lib shell32.lib
* or:
@patthoyts
patthoyts / gist:2004319
Created March 9, 2012 00:24
Quick and dirty patch for gitk to make clickable bug/issue links when displaying commits
From b35942dc61aaa07961662aaaea49eb89ae913670 Mon Sep 17 00:00:00 2001
From: Pat Thoyts <patthoyts@users.sourceforge.net>
Date: Fri, 9 Mar 2012 00:20:51 +0000
Subject: [PATCH] gitk: quick hack to make clickable bug links in commit
message
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
---
gitk | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)