Skip to content

Instantly share code, notes, and snippets.

@mmzsource
mmzsource / cljs-quil-emacs-figwheel-setup.md
Last active August 11, 2023 00:43
Setup dynamic Clojurescript and Quil environment with emacs and figwheel

My environment

  • emacs 26.3
  • cider 0.25.0
  • leiningen 2.9.4 on Java 11.0.2
  • ~/.lein/profiles.clj : {:user {:plugins []}}

Project setup

In a terminal, run these commands:

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@BusFactor1Inc
BusFactor1Inc / scheme-coin.lisp
Created December 16, 2017 07:28
A Common Lisp Blockchain - Scheme Coin
;;
;; scheme coin - a common lisp blockchain
;;
;; Burton Samograd
;; 2017
(load "~/quicklisp/setup.lisp")
(defconstant *coin-name* "Scheme Coin")
@rumblesan
rumblesan / takeaway.md
Last active December 9, 2020 16:51
Take away doc for the HipHop and Code workshop

How Clojure's documentation can leapfrog other languages

Summary

I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.

The Problem

Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."

(ns overtone-workshop.core
(:require [overtone.algo.euclidean-rhythm :refer [euclidean-rhythm]])
(:require [overtone.synth.stringed :refer :all])
(:require [overtone.live :refer :all]))
(use 'overtone.live)
;; http://quod.lib.umich.edu/cgi/p/pod/dod-idx/synthesizing-a-javanese-gong-ageng.pdf
(definst bell [frequency 440 duration 1.0 volume 1.0 position 0 wet 0.5 room 0.5
h0 1 h1 0.6 h2 0.4 h3 0.25 h4 0.2]
(let [harmonics [ 1 2 3 4.2 5.4]
@TiliSleepStealer
TiliSleepStealer / DoomGlow.cs
Created June 13, 2017 21:45
Doom glow - fake volumetric light glow effect in Unity by Tili_us
// This file is in the public domain. Where
// a public domain declaration is not recognized, you are granted
// a license to freely use, modify, and redistribute this file in
// any way you choose.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Unity remake of a fake volumetric light glow effect
@markusleh
markusleh / volatility-pool-visualize.py
Last active June 25, 2021 14:14
Python program to visualize Windows bigpool content
import svgwrite
import volatility.conf as conf
import volatility.registry as registry
import volatility.plugins.volshell as shell
registry.PluginImporter()
config = conf.ConfObject()
import volatility.commands as commands
import volatility.addrspace as addrspace
import volatility.utils as utils
registry.register_global_options(config, commands.Command)
@simonw
simonw / recover_source_code.md
Last active September 28, 2024 08:10
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb