Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script>
glyphs = [
[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], // padding
[0, 0, 0, 0, 0, 0, 0, 0], // , 32
[8, 8, 8, 8, 8, 0, 8, 0], // !, 33
[20, 20, 20, 0, 0, 0, 0, 0], // ", 34
<!DOCTYPE html>
<html>
<head>
<script>
function isBitOn(number, index) {
return Boolean(number & (1 << index));
}
window.onload = function() {
var canvas = document.getElementById('canvas');
alias night="pmset displaysleepnow && osascript -e \"set volume output volume 34\""
using System;
using System.Collections.Generic;
public class Program
{
enum eStat
{
HPNow,
HPMax,
using System;
using System.Collections;
using System.Collections.Generic;
class MainClass {
public static void PrintList<T>(List<T> l)
{
for (int i = l.Count - 1; i >= 0 ; i--)
# import the main window object (mw) from aqt
# from the anki tutorial: https://apps.ankiweb.net/docs/addons.html
from aqt import mw
# import the "show info" tool from utils.py
from aqt.utils import showInfo, getTag, tooltip
# import all of the Qt GUI library
from aqt.qt import *
from aqt.reviewer import Reviewer
@balaam
balaam / gist:8c4bfe0c716bda03222c7669f5dcf905
Created March 2, 2018 10:14
Instance Helper for Scriptable Objects
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using UnityEditor;
public class ScriptableObjectInstanceHelper
{
[MenuItem ("Assets/Create Instance", false, 0)]
private static void CreateInstance ()
@balaam
balaam / gist:5e03065b4ec0dcda60fab7aa1a45229f
Created December 16, 2017 10:41
My horrible hacking of the quick tag anki plugin
# Quick Tagging is an anki2 addon for quickly adding tags while reviewing
# Copyright 2012 Cayenne Boyer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@balaam
balaam / Watch.lua
Created October 4, 2016 07:45
A Lua project for Dinodeck that lets the user explore the global memory space
Watch = {}
Watch.__index = Watch
function Watch:Create()
local this =
{
key = {},
keyRoot =
{
id = "_G",
cursor = 1,
#!/opt/local/bin/lua
--
-- Simple parser
--
if not arg[1] then
print "Need a filename as an argument."
return
end