Skip to content

Instantly share code, notes, and snippets.

View afcondon's full-sized avatar

Andrew Condon afcondon

View GitHub Profile
@groves
groves / copy_layer.py
Last active January 11, 2022 15:49
Scripts to tweak Keyboardio Chrysalis exported JSON keymaps
import json
import sys
def usage():
print("python copy_layer.py <source layout JSON file> <destination layout JSON file> <copy from layer index> <copy to layer index>")
sys.exit(1)
if len(sys.argv) != 5:
usage()
@i-am-the-slime
i-am-the-slime / How to build an Apple Silicon version of the PureScript compiler.md
Last active July 7, 2022 10:06
How to build an Apple Silicon version of the PureScript compiler

How to build an Apple Silicon version of the PureScript compiler

Updates:

2022-07-01

Add prebuilt binary for 0.15.4

2022-06-24

I changed ghc to be installed with ghcup and ghc version to 9.2.3 to match PS 0.15.3 added the RELEASE flag.

@knandersen
knandersen / morphagene_ableton.py
Last active June 7, 2024 11:53 — forked from ferrihydrite/morphagene_audacity.py
Allows you to use Ableton projects and exports as reels for the Make Noise Morphagene eurorack module. Since a few people have found the script not working or difficulty getting python to work, I have created a web-based tool: https://knandersen.github.io/morphaweb/
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE:
morphagene_ableton.py -w <inputwavfile> -l <inputlabels> -o <outputfile>'
Instructions in Ableton:
Insert locators as splice markers in your project (Create > Add Locator)
Export Audio/Video with
Sample Rate: 48000 Hz
@JordanMartinez
JordanMartinez / Modern FP with mtl.purs
Last active March 19, 2021 06:55 — forked from ocharles/Modern FP with mtl.hs
Purescript port of the original Haskell "Modern FP with MTL"
module Modern_FP_With_MTL where
import Effect.Console as Console
import Effect (Effect)
import Effect.Class (class MonadEffect, liftEffect)
import Control.Monad.Trans.Class (class MonadTrans, lift)
import Prelude
{-
Since Purescript does not have Haskell's "GeneralizedNewtypeDeriving" language

How to upgrade to Purescript 0.12

Before we begin, the type search in Pursuit is a great way to search for the functions you need.

Reset your tooling by deleting the bower_components/, .psci_modules/, .pulp-cache/, .psc-package/ and output/ folders. Then run psc-package build --only-dependencies.

Import changes and effects

Using sed or your other favourite global replace tool to search and replace all occurences in the list

@beckyconning
beckyconning / Bingo.elm
Last active March 29, 2016 07:44
Bingo card generator app in both Elm 0.16.0 and Purescript v0.7.6.1 for comparison. The apps are almost identical except that the Elm version uses a random seed and the Purescript version includes a "FREE SPACE" in the middle. Elm version by Charlotte Tortorella, Purescript version by Becky Conning.
import Signal
import Graphics.Element exposing (..)
import Graphics.Input exposing (button)
import Graphics.Collage exposing (collage, toForm)
import List exposing (..)
import Color
import Text
import Random
import Random.Array
import Window
@eyaler
eyaler / graph.json
Last active December 26, 2023 07:36
Force-Directed Graph with Drag/Zoom/Pan/Center/Resize/Labels/Shapes/Filter/Highlight
{
"graph": [],
"links": [
{"source": 0, "target": 1},
{"source": 0, "target": 2},
{"source": 0, "target": 3},
{"source": 0, "target": 4},
{"source": 0, "target": 5},
{"source": 0, "target": 6},
{"source": 1, "target": 3},
@OverZealous
OverZealous / build.config.js
Last active June 21, 2021 04:12
Preliminary Gulpfile for replicating ngBoilerplate — Still a work in progress!
/**
* This file/module contains all configuration for the build process.
*/
/**
* Load requires and directory resources
*/
var join = require('path').join,
bowerrc = JSON.parse(require('fs').readFileSync('./.bowerrc', {encoding: 'utf8'})),
bowerJSON = bowerrc.json.replace(/^\.?\/?/, './'),
@OverZealous
OverZealous / 1 gulpfile.js
Last active May 26, 2016 19:39
Gulpfile for replicating ngboilerplate
//<editor-fold desc="Node Requires, gulp, etc">
var gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
csso = require('gulp-csso'),
debug = require('gulp-debug'),
footer = require('gulp-footer'),
gutil = require('gulp-util'),
gzip = require('gulp-gzip'),