Skip to content

Instantly share code, notes, and snippets.

@MadcapJake
MadcapJake / Hisyeo.txt
Last active November 5, 2024 00:07
Hisyëö Input Method
### File header must not be modified
### This file must be encoded into UTF-8.
### This table under LGPL
### comments start with ### not single #
### Derive from the format of SCIM Table, so you can modify the table from
### scim-tables' table
SCIM_Generic_Table_Phrase_Library_TEXT
VERSION_1_0
BEGIN_DEFINITION
@MadcapJake
MadcapJake / KokanuIPA.txt
Last active October 17, 2023 23:16
Kokanu Input Method
### File header must not be modified
### This file must be encoded into UTF-8.
### This table under LGPL
### comments start with ### not single #
### Derive from the format of SCIM Table, so you can modify the table from
### scim-tables' table
SCIM_Generic_Table_Phrase_Library_TEXT
VERSION_1_0
BEGIN_DEFINITION
@MadcapJake
MadcapJake / kokanu.mjs
Last active September 22, 2023 17:46 — forked from 2sh/kokanu.mjs
convert powerpoint pdf svgs into pngs for use on courses
#!/usr/bin/env node
// mkdir input && mkdir cleaned && mkdir raster
// pdf2svg Logography\ for\ Kokanu.pdf input/kokanu_%d.svg all
// node kokanu.mjs pre
// node kokanu.mjs post
import fs from 'fs/promises'
import fsx from 'fs'
import readline from 'readline'

If you're going to do the @@ sigil, why not just place it directly on the name? The getting and setting could be determined from function signature.

class Foo
  @@random: -> Math.random()
  @@name: -> Db.query 'name'
  @@name: (newName) -> Db.update 'name', newName

I don't particularly like how close it is to @ while being very different in action.

@MadcapJake
MadcapJake / vision.md
Last active January 26, 2018 20:30
CareML

CoffeeScript Always Reduces Effort -- Markup Language

import CareML from 'coffee-html'
class extends CareML then tag: 'div', id: 'page', children: ->
	@div['#header'] ->
		@h1.classy 'h', style: { 'background-color': '#22df' }
	@div['#menu'] style: { 'background-color': '#2f2' }, ->
		@ul ->
 @li 'one'
@MadcapJake
MadcapJake / citrine.spec
Created June 3, 2017 23:14
Citrine RPM Spec
Name: citrine
Version: 0.7.2
Release: 1%{?dist}
Summary: An easy-to-learn general-purpose programming language
License: BSD
URL: http://citrine-lang.org
Source0: https://github.com/gabordemooij/%{name}/archive/%{version}.tar.gz
%description
A clean and simple programming language that combines Smalltalk-like messaging
@MadcapJake
MadcapJake / json.md
Last active May 29, 2017 22:12
JSON pointer setting
struct json_object* jobj = json_object_new_object();

ctr_internal_object_set_property(
	jsonObjectInstance,
	ctr_build_string_from_cstring( "_pointer" ),
	ctr_build_number_from_float((long) jobj),
	CTR_CATEGORY_PRIVATE_PROPERTY
);

Keybase proof

I hereby claim:

  • I am madcapjake on github.
  • I am madcapjake (https://keybase.io/madcapjake) on keybase.
  • I have a public key ASAVjWj3RW_sKL2_ketyyJE2JoKqZPl4l4S53KdUtUU-Zwo

To claim this, I am signing this object:

@MadcapJake
MadcapJake / package.yml
Created April 9, 2017 14:20
Solus Stanza Package
name : lbstanza
version : 0.11.7
release : 1
source :
- http://lbstanza.org/resources/stanza/lstanza_0_11_7.zip : 87f59bf4ad42c76bee7b141fc860c79ee39890acbcf46effec58cb0a17350ffb
license : BSD-3-Clause
component : programming
summary : Optionally-typed prototype-based language
description: |
L.B. Stanza (or Stanza for short) is a new optionally-typed general purpose programming language designed to help programmers tackle the complexity of architecting large programs and significantly increase the productivity of application programmers across the entire software development life cycle.
@MadcapJake
MadcapJake / IntPair.pl6
Created May 17, 2016 16:41
IntPair Subset
subset IntPair of Pair where {
die "Key $_.key() is not an Int" unless val($_.key.Str) ~~ Int;
die "Value $_.value() is not an Int" unless .value ~~ Int;
True
}
my IntPair @edges =
1 => 2,
3 => 4,
6 => 2;