Skip to content

Instantly share code, notes, and snippets.

View Archenoth's full-sized avatar
💕
Arrested for Oshawott crimes

Arch 💕 Archenoth

💕
Arrested for Oshawott crimes
View GitHub Profile
@0xabad1dea
0xabad1dea / speedrunning-faq.md
Last active February 26, 2024 17:42
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 January 6, 2024 07:19
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

@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,