Skip to content

Instantly share code, notes, and snippets.

@jadient
jadient / h2c.py
Last active January 4, 2016 01:59
import re
def replace_one_hex_with_chr(m):
return str(unichr(int(m.group()[1:], 16)))
def replace_hex_with_chr(s):
return re.sub(r'%[0-9A-Fa-f][0-9A-Fa-f]', replace_one_hex_with_chr, s)
if __name__ == '__main__':
import sys, os
@jadient
jadient / qunit_test.html
Last active December 16, 2015 18:39
QUnit template
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/qunit/1.11.0/qunit.js"></script>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/qunit/1.11.0/qunit.css">
<script src="yourJavascriptFile.js"></script>
<script src="yourTestScriptFile.js"></script>
</head>
@jadient
jadient / PastePlainText.ahk
Last active March 9, 2021 05:31
AutoHotKey script to paste text without formatting
; WindowsKey-V shortcut to paste text with no formatting
; (like Paste Special > Plain Text, but faster and works everywhere)
; for AutoHotKey
#v::
ClipSaved := ClipboardAll
tempClipboard = %clipboard%
Clipboard = %tempClipboard%
SendPlay ^v
Clipboard := ClipSaved
; add an arbitrary delay to increase reliability for certain apps