Skip to content

Instantly share code, notes, and snippets.

View PlumpMath's full-sized avatar
🏠
Pro

PlumpMath

🏠
Pro
View GitHub Profile
@PlumpMath
PlumpMath / config.scm
Created March 8, 2019 16:27 — forked from TeMPOraL/config.scm
GuixSD with custom kernel
(define-module (my packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages linux)
#:use-module (guix build-system trivial)
#:use-module (gnu)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages))
(define (linux-nonfree-urls version)
@PlumpMath
PlumpMath / polyglot.md
Created February 21, 2019 21:19 — forked from mfikes/polyglot.md
Polyglot Graal from ClojureScript

You need to first install GraalVM, and then set your PATH so that you get the GraalVM binaries (incluing the GraalVM version of node).

You can then install R and Ruby via

gu -c install org.graalvm.r
gu -c install org.graalvm.ruby
@PlumpMath
PlumpMath / deepmap.clj
Created February 17, 2019 22:30 — forked from joinr/deepmap.clj
building a deep nested map without blowing the stack
(defn children [item coll]
(-> (filter #(= (:parent %) (:id item)) coll)
seq))
(defn item-children
([get-children item coll]
(if-let [xs (get-children item coll)]
(map #(lazy-seq (cons item (item-children get-children % coll))) xs)
(list [item nil])))
([item coll] (item-children (memoize children) item coll)))
@PlumpMath
PlumpMath / clojure-make-nested-map.clj
Created February 17, 2019 22:30 — forked from dnaeon/clojure-make-nested-map.clj
clojure-make-nested-map
;;
;; Making a deeply nested map by following parent-child relations between items
;;
(defn make-items [n]
(concat [{:id 0 :name "item-root"}]
(for [x (range 1 n)] {:id x :parent (dec x) :item (format "item-%d" x)})))
(defn item-children [item coll]
(if-let [children (-> (filter #(= (:parent %) (:id item)) coll) seq)]
@PlumpMath
PlumpMath / idb.cljs
Created February 17, 2019 20:24 — forked from leblowl/idb.cljs
simple clojurescript interface to IndexedDB for github.com/leblowl/lokate
(def db (atom nil))
(defn error [e]
(.error js/console "An IndexedDB error has occured!" e))
(defn new [cb]
(let [version 1
request (.open js/indexedDB "lokate" version)]
(set! (.-onupgradeneeded request) (fn [e]
(reset! db (.. e -target -result))
@PlumpMath
PlumpMath / index.html
Created January 31, 2019 17:13 — forked from bellbind/index.html
[threejs] simplified gltf2 loader example
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/three"></script>
<script
src="https://unpkg.com/three/examples/js/loaders/GLTF2Loader.js"
></script>
<script src="script.js" defer="defer"></script>
</head>
@PlumpMath
PlumpMath / canvas.cljs
Created January 31, 2019 16:56 — forked from postspectacular/canvas.cljs
Reagent canvas component
(ns canvas
(:require
[thi.ng.geom.gl.webgl.animator :as anim]
[reagent.core :as reagent]))
(defn canvas-component
[props]
(reagent/create-class
{:component-did-mount
(fn [this]
@PlumpMath
PlumpMath / MyWPFUI.xaml
Created November 9, 2017 14:15 — forked from schuster-rainer/MyWPFUI.xaml
Clojure.Compile a ClojureCLR script with gen-class and a WPF UI into an executable console app
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="My WPF UI" Height="300" Width="300">
<StackPanel Margin="5">
<StackPanel>
<Label Content="Prename:" />
<TextBox x:Name="preName" MinWidth="50"/>
</StackPanel>
<StackPanel>
<Label Content="Surename:" />
@PlumpMath
PlumpMath / django-test-easy-and-fast.md
Created August 27, 2017 18:45 — forked from perhapsspy/django-test-easy-and-fast.md
Django에서 Test 쉽고 빠르게 하기
private IEnumerator UpdateMesh()
{
while (true)
{
Vector3 min = Vector3.zero;
Vector3 max = Vector3.zero;
var filters = mapping.GetMeshFilters();
text.text = "";