Skip to content

Instantly share code, notes, and snippets.

@thomasnield
Created December 3, 2021 19:25
Show Gist options
  • Save thomasnield/31c4921d3b94e48b26b51c740065f22f to your computer and use it in GitHub Desktop.
Save thomasnield/31c4921d3b94e48b26b51c740065f22f to your computer and use it in GitHub Desktop.
O'Reilly Katacoda AHK Helper
^+c::
Clipboard := random_Chars(10)
return
^+v:: Send, %Clipboard%
;-------------------------------------------------------------------------------
random_Chars(Count) { ; returns count random characters
;-------------------------------------------------------------------------------
static Char_List := "ABCDEFGHIJKLMNOPQRSTUVW"
. "abcdefghijklmnopqrstuvw"
, Length := StrLen(Char_List)
Loop, %Count% {
Random, rand, 1, Length
Result .= SubStr(Char_List, rand, 1)
}
return Result
}
::[[run::
SendRaw `
(
**Run:**
``````
python3 explore.py
``````{{execute}}
)
return
::[[code::
SendRaw `
(
<pre class="file" data-filename="explore.py" data-target="replace">
</pre>
)
return
::[[image::
SendRaw `
(
![%Clipboard%](./assets/%Clipboard%.png)
)
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment