Skip to content

Instantly share code, notes, and snippets.

View Archenoth's full-sized avatar
💕
oh dang! i didn't expect you to read this! (i hope you have a super-nice day..!)

Arch 💕 Archenoth

💕
oh dang! i didn't expect you to read this! (i hope you have a super-nice day..!)
View GitHub Profile
@rougier
rougier / nano.el
Created February 4, 2025 18:48
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <[email protected]>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]
#version 300 es
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
out vec4 fragColor;
uniform vec2 resolution;
uniform vec3 orientation;
@0xabad1dea
0xabad1dea / speedrunning-faq.md
Last active November 16, 2024 13:40
Speedrunning FAQ/Glossary

Speedrunning FAQ/Glossary

by 0xabad1dea September 2018

You may notice a decidedly Nintendo bias to the examples. I can't change who I am.

What is Speedrunning?

Speedrunning is:

  • Completing a video game
@omgitsraven
omgitsraven / twitsafe.bat
Created January 31, 2018 15:11
FFMPEG command to produce MP4s that Twitter won't reject
ffmpeg -i %1 -ac 2 -pix_fmt yuv420p -vsync 2 -r 60 %1.mp4
@jacob1
jacob1 / hexchat example lua script.lua
Created July 7, 2017 23:40
Hexchat example Lua script
hexchat.register("myscript", "0.1", "script description goes here")
local function DelayedMessage(context, message)
context:command("say "..message)
end
local function makeFancyCallback(f, ...)
local arg = {...}
return function() return f(unpack(arg)) end
end
(defn neighbors
([size yx] (neighbors [[0 0] [1 1] [-1 -1] [-1 1] [1 -1] [-1 0] [1 0] [0 -1] [0 1]] size yx))
([deltas size yx]
(filter (fn [new-yx]
(every? #(< -1 % size) new-yx))
(map #(vec (map + yx %))
deltas))))
(defn density [matrix y x]
(let [neighbors (map #(get-in matrix %) (neighbors (count matrix) [y x]))
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@sunng87
sunng87 / reflection.clj
Created November 20, 2015 10:04
clojure: access private field/method via reflection
(defn invoke-private-method [obj fn-name-string & args]
(let [m (first (filter (fn [x] (.. x getName (equals fn-name-string)))
(.. obj getClass getDeclaredMethods)))]
(. m (setAccessible true))
(. m (invoke obj args))))
(defn private-field [obj fn-name-string]
(let [m (.. obj getClass (getDeclaredField fn-name-string))]
(. m (setAccessible true))
(. m (get obj))))
if [ $EUID != 0 ]; then
echo "It's a weird tree."
else
echo ' _ __'
echo ' / `\ (~._ ./ )'
echo ' \__/ __`-_\__/ ./'
echo ' _ \ \/ \ \ |_ __'
echo ' ( ) \__/ -^ \ / \'
echo ' \_/ " \ | o o |.. / __'
echo " \\. --' ==== / || / \\ "
@iantruslove
iantruslove / README.md
Created February 16, 2014 19:34
Building a simple ClojureScript single page web application [Den of Clojure Feb 2014]

Beyond hello world: building a simple ClojureScript single page web application

Shown at Feb '14 Den of Clojure

Intro

So you've read the blogs and thought how fun it would be to write web front ends with your favorite lisp. Perhaps you've even fired up the repl and done a little playing. But how do you get from there to a