Skip to content

Instantly share code, notes, and snippets.

@atenni
atenni / README.md
Last active April 24, 2024 01:36
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@Danik
Danik / capslock_remap_alt.ahk
Last active April 15, 2024 11:34
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
@stevesouders
stevesouders / activetable.js
Last active March 18, 2024 15:15
ActiveTable is a bookmarklet that makes any table sortable. It also allows you to remove columns, and it remembers the removed columns for next time. Use alt+click to UNhide all columns (and clear memory). To use it, create a bookmark called "ActiveTable" that has this URL: javascript:(function(){ var jselem=document.createElement('SCRIPT'); jse…
// ActiveTable - a bookmarklet to make tables sortable and editable
function init() {
var aHrows = getHrows();
var numHrows = aHrows.length;
var aHidden = getHiddenColumns();
ATpopup = document.createElement("div");
ATpopup.style.cssText = "position: absolute; visibility: hidden; padding: 0; font-family: Arial; background-color: rgba(255, 255, 255, 0.9); border-radius: .5em; text-align: center; box-shadow: .05em .05em .5em #00C;";
ATpopup.innerHTML = "<a href='sort' title='sort' onclick='sortColumn(); return false'><img border=0 src='http://stevesouders.com/images/sort_up_down.png' style='padding-top: 0.2em;'></a><br><a href='hide' style='color: #C00; font-family: monospace; font-size: 1.5em; text-decoration: none;' title='hide' onclick='hideColumn(); return false'>x</a>"; // TODO - use protocol-less URL for img
@martindale
martindale / parseTitleString.js
Last active September 25, 2020 01:33
Parse a string, such as a YouTube video title, for artist and track information.
// TODO: provide an array of potential separators
// var SEPARATORS = [' - ', ' – ', ' -- ']
// note that these can have spaces, but sometimes do not
// TODO: output a testing dataset for changes to this function.
var TRACK_SEPARATOR = ' - ';
function parseTitleString(string, partsCallback) {
var artist, title, credits = [];
var string = string || '';
@abernier
abernier / index.html
Last active August 8, 2016 17:31
Email CSS direction obfuscation -- with progressive enhancement
<!DOCTYPE html>
<meta charset=utf-8>
<title>Email CSS direction obfuscation -- with progressive enhancement</title>
<span style="display:inline-block; unicode-bidi:bidi-override; direction:rtl;" onmouseover="this.innerText=this.innerText.split('').reverse().join(''); this.style.unicodeBidi='';this.style.direction=''; this.removeAttribute('onmouseover');">
moc.liamg@reinreb.eniotna
</span>
@tmplinshi
tmplinshi / KeypressOSD.ahk
Last active February 16, 2024 12:55
Note: This script has been moved to https://github.com/tmplinshi/KeypressOSD
; KeypressOSD.ahk
;--------------------------------------------------------------------------------------------------------------------------
; ChangeLog : v2.22 (2017-02-25) - Now pressing same combination keys continuously more than 2 times,
; for example press Ctrl+V 3 times, will displayed as "Ctrl + v (3)"
; v2.21 (2017-02-24) - Fixed LWin/RWin not poping up start menu
; v2.20 (2017-02-24) - Added displaying continuous-pressed combination keys.
; e.g.: With CTRL key held down, pressing K and U continuously will shown as "Ctrl + k, u"
; v2.10 (2017-01-22) - Added ShowStickyModKeyCount option
; v2.09 (2017-01-22) - Added ShowModifierKeyCount option
; v2.08 (2017-01-19) - Fixed a bug
@ferventcoder
ferventcoder / FixGitSymlinkStatusIssues.ps1
Last active March 24, 2024 01:42
Git Symlinks POSIX vs Windows - Fixes Permission Denied issues when you share a repository as part of your Shared Folders with one or more Windows VMs.
# This fixes Permission denied errors you might get when
# there are git symlinks being used on repositories that
# you share in both POSIX (usually the host) and Windows (VM).
#
# This is not an issue if you are checking out the same
# repository separately in each platform. This is only an issue
# when it's the same working set (aka make a change w/out
# committing on OSX, go to Windows VM and git status would show
# you that change).
#
@peterjs
peterjs / gist:8041753
Last active March 18, 2018 09:53
Change keyboard layout on getting/losing focus
;========================================================================
;
; Template: WinTrigger (former OnOpen/OnClose)
; Description: Act upon (de)activation/(un)existance of programs/windows
; Online Ref.: http://www.autohotkey.com/forum/viewtopic.php?t=63673
;
; Last Update: 15/Mar/2010 17:30
;
; Created by: MasterFocus
; http://www.autohotkey.net/~MasterFocus/AHK/
@zed9h
zed9h / pangram-ligatures-and-other-font-stress-tests.txt
Last active May 17, 2018 07:55
text to speech pronunciation challenge. speech synthesis test sample. font stress test sample.
Panagrams, ligatures and other font stress tests
Hamburgefonstiv
#123,456.7890mph
1lIi, 2z, 3E, 4yuA, 5sS, 6bG, 7L, 8B, 9g, 0Oo
bdpq
"…", “…”, ‘…’,:;.!? () {} []
- hyphen, – en dash, — em dash
SAMPLE KERNING PAIRS
AT AV AW AY Av Aw Ay Fa Fe Fo Kv Kw Ky LO LV LY PA Pa Pe Po TA