# Meizu MX Phone (MTP): VID=2a45 and PID=2008 | |
services.udev.extraRules= '' | |
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", ATTR{idProduct}=="2008", MODE="0666", GROUP="mtp" | |
''; |
(ns gjs-example.core) | |
(defn main [] | |
(set! (-> js/imports .-gi .-versions .-Gtk) "3.0") | |
(let [Gtk (doto (-> js/imports .-gi .-Gtk) (.init nil)) | |
window (Gtk.Window. | |
(clj->js | |
{:type (-> Gtk .-WindowType .-TOPLEVEL) | |
:title "A default title" | |
:default_width 300 |
(def str new-string) | |
(defmacro u8 | |
[s] | |
(let [s# (into [] (.getBytes s))] | |
`(str (list ~@s#)))) | |
(defn digit->words [c] | |
(cond | |
(= c \0) (u8 "không"), |
# This isn't meant to be ran as a script, but line-by-line | |
# Props to Binary (benary.org) for helping me with this | |
# 0: Create a Scaleway instance and SSH into it | |
ssh root@... | |
# 1: Install Nix | |
adduser user # set a password, doesn't matter what because it's not staying long | |
adduser user sudo | |
su -l user |
This project code provides a Clojurescript REPL for Quickjs via weasel.
Quickjs is a lightweight javascript engine with low memory footprint.
Clojurescript code compiled in advanced mode can be turned into standalone executables via Quickjs's qjsc
.
Your app can use awesome cljs libraries like core.async, clojure.spec, pathom and datascript without any problem. React should be possible with a custom renderer, like: https://github.com/doodlewind/react-ssd1306
A REPL is handly to develop such apps. The easiest way to create a REPL env for Clojurescript is to leverage weasel. However, Quickjs doesn't support Websocket out of the box. Wiring up a websocket client via C api is undesired. Fortunately, there's a python wrapper for Quickjs.
The j package in nixpkgs does not include Qt IDE. This project packages binaries from upstream.
The IDE (jqt
) was written in a way that it must be place in the same directory with jconsole
and other *.so files.
Therefore this project has them all in a bin
directory. (I tried to keep jconsole and jqt in separate packages then combine them back in a FHSUserEnv but it doesn't work).
Though jqt
binaries and libraries is included, upstream tarball doesn't contain any *.ijs files, so one must download them using j package manager. You will see complaints that jqt script files are missing when you first start the IDE (jqt
).
(ns helloworld.core) | |
;; two identical code blocks | |
;; first one is at top level | |
(let [{:keys [a-b a_b]} {:a-b 0 :a_b 1}] [a-b a_b]) | |
;; second one nested inside a function call | |
(println (let [{:keys [a-b a_b]} {:a-b 0 :a_b 1}] [a-b a_b])) |
Listing pods with kubectl get pods
, then select a pod name and copy paste it into kubectl logs [pod name]
- I want to streamline my workflow and stop using the terminal
- learn more about kubernetes
- main kubernetes extension for Emacs out there is greedy for permissions