Skip to content

Instantly share code, notes, and snippets.

View WA9ACE's full-sized avatar
🏍️
🛣🚐 💨 Exploring

Caleb Albritton WA9ACE

🏍️
🛣🚐 💨 Exploring
View GitHub Profile
@WA9ACE
WA9ACE / keybase.md
Created June 6, 2018 16:53
keybase.md

Keybase proof

I hereby claim:

  • I am wa9ace on github.
  • I am wa9ace (https://keybase.io/wa9ace) on keybase.
  • I have a public key ASCxK2rH4QBpF_O_i6K2bkM8XHbyNBectPB4In9qb7YyvAo

To claim this, I am signing this object:

#NoTrayIcon
#Persistent
global hWSL
/* Setup Tray icon and add item that will handle
* double click events
*/
Menu Tray, Icon
Menu Tray, Icon, C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc\images\icon.ico

Keybase proof

I hereby claim:

  • I am wa9ace on github.
  • I am wa9ace (https://keybase.io/wa9ace) on keybase.
  • I have a public key ASBgrqZQ9t_eAyOTrBSk5uydXR6LWXg3AaVIPlOrmWzpsAo

To claim this, I am signing this object:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<title>Hello World WASM</title>
</head>
<body>
@WA9ACE
WA9ACE / hello.js
Created April 22, 2017 01:16
Hello World WASM bootstrap
document.addEventListener("DOMContentLoaded", main)
function log(offset, length) {
const bytes = new Uint8Array(memory.buffer, offset, length)
const string = new TextDecoder('utf8').decode(bytes)
console.log(string)
}
var memory = new WebAssembly.Memory({ initial : 20 });
@WA9ACE
WA9ACE / hello.wast
Created April 22, 2017 01:13
Imports memory and print functions and calls print passing memory offset and length
module
(import "stdlib" "print" (func $print (param i32 i32)))
(import "js" "mem" (memory 20))
(data (i32.const 0) "Hello World")
(func (export "main")
i32.const 0 ;; pass offset 0 to log
i32.const 20 ;; pass length 20 to log
call $print))
@WA9ACE
WA9ACE / router.js
Created September 18, 2016 19:00
class Router {
constructor (routes = [], root = '/') {
this.routes = routes
this.root = root
window.addEventListener('hashchange', this._handler.bind(this))
}
start (initialRoute) {
this._handler()
}
@WA9ACE
WA9ACE / gist:2d7110a6924590101a1f
Last active August 29, 2015 14:19
sublime afterglow settings
{
"theme": "Afterglow-blue.sublime-theme",
"color_inactive_tabs": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
// "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_face": "Monaco",
"font_size": 14,
"ignored_packages":
[
"Vintage"
@WA9ACE
WA9ACE / hide_menubar.py
Last active August 29, 2015 14:16
Sublime Text 3 Plugin to always hide the menubar.
import sublime, sublime_plugin
class AlwaysHideMenubar(sublime_plugin.EventListener):
def hide(self, view):
is_menubar_visible = view.settings().get("menu_visible")
if is_menubar_visible is not False:
window.run_command("toggle_menu")
def on_new(self, view):
@WA9ACE
WA9ACE / CMD+` for Windows
Created March 1, 2015 03:47
This allows you to use alt+` to switch between windows of the same application akin to OS X's CMD+`
; This allows you to use alt+` to switch between windows of the same application akin to OS X's CMD+`
!`:: ; Next window
WinGetClass, ActiveClass, A
WinSet, Bottom,, A
WinActivate, ahk_class %ActiveClass%
return