Skip to content

Instantly share code, notes, and snippets.

View souenzzo's full-sized avatar
🚴‍♂️
💨 💨

Enzzo souenzzo

🚴‍♂️
💨 💨
View GitHub Profile
@vgmoose
vgmoose / a_readme.md
Last active February 5, 2024 06:23
Yet another How to Create a Windows 11 Install USB from Ubuntu Linux or Mac

Creating a Windows 11 Install USB in 2022

I have been installing Windows for a long time. Does it get easier? I want to say it gets easier, but it seems like there's always some new wrinkle! These instructions are as much a note to my future self as they may be useful to anyone else.

For me, I was not able to get any exfat-based installs, or even any of the GUI helpers to make this process any more straightforward. Maybe on your target Windows / host OS those helpers will work, but the below process (as of current year) is consistent, and not overly complicated.

Overview:

  1. Downloading an official ISO image from MS:
  2. Formatting the drive (at least 8GB) as GPT, and one FAT-format partition (aka MS-DOS)
@mfikes
mfikes / README.md
Last active April 5, 2021 02:17
Example of foreign library property namespace

Example using library property namespace with a foreign lib:

clj -M -m cljs.main -co co.edn -re node -r
ClojureScript 1.10.844
cljs.user=> (require '[yq$yowza :as yz :refer [getMessage]])
nil
cljs.user=> (getMessage)
"Hello, world!"
cljs.user=> (yz/sayHello "hola")
@yogthos
yogthos / USSR.md
Last active July 22, 2023 18:21
some facts about USSR

Russia went from a backwards agrarian society where people travelled by horse and carriage to being the first in space in the span of 40 years. Russia showed incredible growth after the revolution that surpassed the rest of the world:

USSR provided free education to all citizens resulting in literacy rising from 33% to 99.9%:

@borkdude
borkdude / sci_google_cloud.js
Last active March 1, 2020 13:21
Google cloud function running sci
const { evalString } = require("@borkdude/sci");
let printlnArgs = [];
function println(...args) {
printlnArgs.push(args.map(arg => arg.toString()).join(" "));
}
exports.evalClojureExpr = (req, res) => {
const { text } = req.body;
@borkdude
borkdude / http-socket-server.clj
Last active May 3, 2021 22:59 — forked from souenzzo/http-socket-server.clj
tiny http server via java sockets in babashka
#!/usr/bin/env bb
(import (java.net ServerSocket))
(require '[clojure.string :as string] '[clojure.java.io :as io])
(with-open [server-socket (new ServerSocket 8080)
client-socket (.accept server-socket)]
(loop []
(let [out (io/writer (.getOutputStream client-socket))
in (io/reader (.getInputStream client-socket))
@souenzzo
souenzzo / find-unused-deps.clj
Created November 4, 2019 17:09
!!!! QUCK'n'DIRTY SOLUTION !!!!
(let [{:keys [namespace-usages]} (:analysis (kondo/run! {:lint ["src/main"
"src/old"]
:config {:output {:analysis true}}}))
url->splited-path #(into []
(comp (map (memfn getFileName))
(map str)
(take-while (complement string/blank?)))
(iterate (fn [x] (when x (.getParent x)))
(Paths/get (new URI (-> (str %)
(string/replace #"^jar\:"
@borkdude
borkdude / js_parser.clj
Last active August 6, 2023 22:14
Parse JavaScript in Clojure using the Google Closure Compiler
#!/bin/sh
#_(
"exec" "clojure" "-Sdeps" "{:deps {org.clojure/clojurescript {:mvn/version \"1.10.520\"}}}" "$0" "$@"
)
;; running js_parser.clj "function foo(x) { var y = x + 1; }" will print:
;; [{:type :function, :name "foo", :body [{:variable-statement [{:lvalue "y", :initializer {:type :binary-op, :left "x", :operator "+", :right "1"}}]}], :params ["x"]}]
Error building classpath. Failed to read artifact descriptor for com.datomic:ion:jar:0.9.28
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.datomic:ion:jar:0.9.28
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:276)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:192)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:253)
at clojure.tools.deps.alpha.extensions.maven$eval685$fn__687.invoke(maven.clj:82)
at clojure.lang.MultiFn.invoke(MultiFn.java:243)
at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:183)
at clojure.tools.deps.alpha$expand_deps.invoke(alpha.clj:165)
at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:228)
@kennyjwilli
kennyjwilli / README.md
Last active November 9, 2018 20:16
Delete leftover Datomic resources

Delete Leftover Datomic Cloud Resources

If you delete a Datomic Cloud system, it will leave some resources in AWS. To entirely delete all resources created by Datomic Cloud, you must follow these steps. Because we love automation, this script performs all these steps for you so you don't need to navigate the AWS Console UI.

Prerequisites

@gfredericks
gfredericks / frobnicate.clj
Last active March 1, 2019 11:35
Self-contained clojure file with deps
#!/usr/bin/env bash
#! top-of-file comments can be written using more #! lines, which
#! is a valid comment in both clojure and bash
":";# alternately this works too
#! The construction below uses cross-language syntactic hackery to
#! specify the -Sdeps arg in a part of the file that's interpreted
#! by clojure as clojure syntax (i.e., not a line comment), so it