Skip to content

Instantly share code, notes, and snippets.

View 0b1kn00b's full-sized avatar

0b1kn00b

View GitHub Profile
(ns ron.reflect "reflection utils")
(require '[clojure.repl :refer [doc]])
(require '[clojure.java.io :as io])
(require '[babashka.classpath :as cp])
(require '[clojure.reflect :as cr])
(require '[clojure.pprint :as pp])
(require '[clojure.string :as str])
(require '[clojure.tools.namespace.find :as fns])
(import
@0b1kn00b
0b1kn00b / haxe_no_return_declr
Created February 5, 2025 09:59
VsCode Regex for Haxe functions with no explicit return type.
s*((static|public|private|inline)\s+)+function(\s+)[a-z0-9_-]*(<[A-Z,]+>)\([^)]*\)\s*[^:]
@0b1kn00b
0b1kn00b / bb.edn
Created December 19, 2024 11:53
Simple pom.xml to install babashka projects locally
;; use with bb run install
{
:tasks {
:requires ([babashka.process :as proc])
install (proc/shell "mvn" "install")
}
}
is_unixy=true
do_install=false
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if ! type "eget" > /dev/null; then
echo "not installed"
do_install=true
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
if ! which bb &> /dev/null; then
#echo "babashka not installed"
if which sudo &> /dev/null; then
#echo "sudo exists, using it"
sudo bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
else
#echo "assuming that user is administrator"
bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
fi
# else
@0b1kn00b
0b1kn00b / customField.js
Last active June 10, 2024 17:16
#Strapi #React customField
app.customFields.register({
"name" : "editorjs-field",
"pluginId" : pluginId,
"type" : "json",
"components" : {
Input: async () => {
const Module = (await import ('./components/Editor'));
const Component = Module.default;
const inst : React.FC<any> = ( ({...props}) => {
return (
@0b1kn00b
0b1kn00b / flake.nix
Created January 24, 2023 16:01
Struggling with nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs.follows = "nix/nixpkgs";
# debug.url
nguix.url = "github:sauricat/nguix";
nguix.follows = "nix/nixpkgs";
#stdenv.url
};