Skip to content

Instantly share code, notes, and snippets.

View nasser's full-sized avatar
🛰️
save-lisp-and-die

Ramsey Nasser nasser

🛰️
save-lisp-and-die
View GitHub Profile
wget -qO - https://source.unsplash.com/1920x1080/?minimal | feh --bg-fill -
(def Client (.-Client (js/require "node-osc"))) ;; var Client = require("node-osc").Client;
(def client (Client. "127.0.0.1" 8000)) ;; var client = new Client("127.0.0.1", 8000);
(.send client "/foo/bar" 99) ;; client.send("/foo/bar", 99);
diff --git a/blender/exp/gltf2_blender_extract.py b/blender/exp/gltf2_blender_extract.py
index b5c09de..c65a9fc 100644
--- a/blender/exp/gltf2_blender_extract.py
+++ b/blender/exp/gltf2_blender_extract.py
@@ -32,6 +32,7 @@ from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins
INDICES_ID = 'indices'
MATERIAL_ID = 'material'
ATTRIBUTES_ID = 'attributes'
+MODE_ID = 'mode'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nasser
nasser / ajeeb.ts
Created April 15, 2019 14:41
rough cut of the ajeeb framework and ecs
type Entity = number
export class ComponentStore {
name: string // for debugging
entities: Array<Entity>;
indices: Array<number>;
components: Array<any>;
size: number;
constructor(name:string) {
<html>
<head>
<title>Simple Line Graph using SVG and d3.js</title>
<script src="d3.v2.js"></script>
<style>
html, body {
background: white;
}
/* tell the SVG path to be a thin blue line without any area fill */
path {
@nasser
nasser / julia.clj
Last active February 9, 2019 05:32
;; based on https://rosettacode.org/wiki/Julia_set#C.23
;; no idea why System.Drawing.dll is not normally findable, this should be
;; (import "System.Drawing")
(import-from "/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll")
(use "System.Drawing")
(use "System.Drawing.Imaging")
(defn >> [^Int32 x ^Int32 y]
(cil* Int32 (ldarg-0) (ldarg-1) (ldc-i4-s (const 31b)) (and) (shr)))
@nasser
nasser / mandelbrot.clj
Last active February 9, 2019 02:37
Mandelbrot Renderer Script in Jn
;; based on https://rosettacode.org/wiki/Mandelbrot_set#C.23
;; no idea why System.Drawing.dll is not normally findable, this should be
;; (import "System.Drawing")
(import-from "/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll")
(use "System.Drawing")
(use "System.Drawing.Imaging")
;; should be in stdlib
(defn jn.core/- [^Double a ^Double b]
(cil* Double (ldarg-0) (ldarg-1) (sub)))
; Function Attrs: uwtable
define hidden cc16 float @DynVsIface_Benches_ThroughExact_DynVsIface_TaskDoer(i64* %this, i64* %arg_doer) #3 {
BB0:
br label %BB3
BB3: ; preds = %BB0
br label %BB2
BB2: ; preds = %BB3
%0 = load volatile i64* %arg_doer