Skip to content

Instantly share code, notes, and snippets.

View opensussex's full-sized avatar

Graham Holden opensussex

View GitHub Profile
@opensussex
opensussex / middle-me.md
Last active November 26, 2019 08:25
middle me challenge written in clojure

Challenge Write a function that will take a key of X and place it in the middle of Y repeated N times.

Rules: If X cannot be placed in the middle, return X. N will always be > 0.

(ns test.core
 (:gen-class))
@opensussex
opensussex / PlayState.hx
Created April 28, 2020 15:31
basics of a play state with mouse interaction haxeflixel
package;
import flixel.FlxState;
import flixel.input.mouse.FlxMouseEventManager;
import flixel.input.mouse.FlxMouseButton.FlxMouseButtonID;
class PlayState extends FlxState
{
var player:Player;
override public function create()
@opensussex
opensussex / doubleLinkedList.js
Created January 27, 2021 15:18
little example of a double linkedList
const uuid = require('uuid/v1');
export default class DoubleLinkedList {
list;
currentItemId;
constructor(items) {
this.setList(items);
}
//------------------------------------------
#include "textures.inc"
plane { <0,1,0>,0
pigment {
Tiles_Ptrn()
color_map{
[0.00 color rgb <0,1,0>] // lines
[0.04 color rgb <0,0,0,1>] // space
}
@opensussex
opensussex / karabiner.json
Created January 4, 2023 07:54
karabiner-elements config for wasd keyboard.
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
"complex_modifications": {
@opensussex
opensussex / .env
Created February 23, 2023 16:00
loading environment vars with svelte / rollup in netlify
TEST_VAR="TEST ENVIRONMENT VAR"
@opensussex
opensussex / scritch.rkt
Created June 8, 2023 15:56
Scritch a rough outline of a scratch pad using Racket
#lang racket/gui
(define f (new (class frame%
(super-new))
[label "Scritch"]
[width 800]
[height 600]))
(define c (new editor-canvas% [parent f]))
(define t (new text%))
(send c set-editor t)
(send f show #t)