Skip to content

Instantly share code, notes, and snippets.

View dotemacs's full-sized avatar

Александар Симић dotemacs

View GitHub Profile
#!/bin/sh
version="0.0.1"
what_arch=`uname -m`
if [ ${what_arch} == "x86_64" ]
then
arch="amd64"
elif [ ${what_arch} == "arm64"]
then
$ ./tofu apply -auto-approve
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
OpenTofu will perform the following actions:
# local_file.hello_local_file will be created
+ resource "local_file" "hello_local_file" {
+ content = "Hello terraform local!"
@dotemacs
dotemacs / opentofu-encryption-configuration.md
Created April 4, 2024 12:58
Encryption configuration, for Unix/Linux shell returns exit code 1
(defn update-user
([^js db user]
(update-user db user nil))
([^js db user prev-username]
(let [batch (.batch db)]
(update-user db batch user prev-username)
(.commit batch)))
([^js db batch-or-transaction user prev-username]
(defn update-user
([^js db user]
(update-user db user nil))
([^js db user prev-username]
(let [batch (.batch db)]
(update-user db user prev-username batch)
(.commit batch)))
([^js db user prev-username batch]
@dotemacs
dotemacs / antifennel.el
Created January 12, 2023 15:44
Rough first draft of antifennel.el, a way to call `antifennel` CLI from within Emacs buffers
;; antifennel.el --- Turn Lua code into Fennel code
(defgroup antifennel nil
"Tool to convert Lua code into Fennel code."
:group 'tools)
(defcustom antifennel-cli "antifennel"
"Path to the antifennel executable"
:type 'string
:group 'antifennel)

How to rename PDF form field names

Install leiningen

brew install leiningen

Create a new project

lein new forrob

cd forrob/

@dotemacs
dotemacs / test-run.log
Created April 30, 2021 11:01
Test run of the konserve project, node port
$ clojure -A:dev:test -M -m kaocha.runner "$@"
Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
Downloading: cider/cider-nrepl/0.19.0/cider-nrepl-0.19.0.pom from clojars
Downloading: lambdaisland/kaocha/1.0.641/kaocha-1.0.641.pom from clojars
Downloading: org/clojure/tools.trace/0.7.10/tools.trace-0.7.10.pom from central
Downloading: fipp/fipp/0.6.14/fipp-0.6.14.pom from clojars
Downloading: cider/orchard/0.3.4/orchard-0.3.4.pom from clojars
Downloading: mvxcvi/puget/1.0.2/puget-1.0.2.pom from clojars
Downloading: compliment/compliment/0.3.8/compliment-0.3.8.pom from clojars
Downloading: cljfmt/cljfmt/0.6.1/cljfmt-0.6.1.pom from clojars
@dotemacs
dotemacs / magit-open.org
Created June 9, 2014 18:50
Open remote repo in browser

Open remote repo

(defun parse-url (url)
  "convert a git remote location as a HTTP URL"
  (if (string-match "^http" url)
      url
    (replace-regexp-in-string "\\(.*\\)@\\(.*\\):\\(.*\\)\\(\\.git?\\)"
                              "https://\\2/\\3"
                              url)))