Skip to content

Instantly share code, notes, and snippets.

@4rc0s
4rc0s / SimpleKeyboardHistory.ahk
Created November 7, 2011 16:37
AutoHotKey clipboard history script that is easily navigated and relatively short
; Retrieves saved clipboard information since when this script last ran
Loop C:\tmp\clipvar*.txt
{
clipindex += 1
FileRead clipvar%A_Index%, %A_LoopFileFullPath%
FileDelete %A_LoopFileFullPath%
}
maxindex := clipindex
OnExit ExitSub
@aslushnikov
aslushnikov / example-usage.js
Last active September 26, 2018 07:39
definition of `fake` function to emulate keyboard events in CodeMirror instance. Useful for testing; depends on availability of `codeMirror.triggerOnKeyPress/triggerOnKeyUp` events.
var editor = new CodeMirror({ /* ... */ });
fake(editor, "("); // if you have closebrackets.js addon switched on, this will actually generate "()"
fake(editor, "enter"); // all the crazy indenting logic will be used
fake(editor, "e"); // just letter "e"
fake(editor, 48); // 0
fake(editor, "leftArrow", ["ctrlKey", "shiftKey"]);
@loicbisiere
loicbisiere / material-icons.css
Created November 23, 2017 20:47
Material icons with unicode
/*
* CSS File of Material icons.
* CSS code based on:
* https://google.github.io/material-design-icons/#icon-font-for-the-web
*/
//= depend_on_asset "MaterialIcons-Regular.eot"
//= depend_on_asset "MaterialIcons-Regular.woff2"
//= depend_on_asset "MaterialIcons-Regular.woff"
//= depend_on_asset "MaterialIcons-Regular.ttf"