Skip to content

Instantly share code, notes, and snippets.

View dakra's full-sized avatar

Daniel Kraus dakra

  • Freelancer
  • Karlsruhe, Germany
View GitHub Profile
@alexander-yakushev
alexander-yakushev / deps.edn
Last active September 4, 2023 12:56
System-wide tools.deps configuration and code (for London Clojurians meetup 05'23)
{:deps {org.clojure/clojure {:mvn/version "1.12.0-alpha3"}}
:aliases {:dev {:extra-deps
{com.clojure-goes-fast/clj-async-profiler {:mvn/version "1.0.4"}
com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.4"}
com.clojure-goes-fast/clj-memory-meter {:mvn/version "0.3.0"}}
:jvm-opts ["-Djdk.attach.allowAttachSelf"
"-XX:+UseG1GC"
"-XX:-OmitStackTraceInFastThrow"
@ssrihari
ssrihari / clojure-learning-list.md
Last active April 24, 2024 03:06
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@roman01la
roman01la / analyze.clj
Created March 18, 2021 01:42
analyzing unused and undefined re-frame subscriptions via clj-kondo
(ns analyze.core
(:require [clj-kondo.core :as clj-kondo]
[clojure.set :as set]))
;; checks re-frame's :<- syntax
;; to mark dependency subscriptions as used
(def analyze-reg-sub
"(require '[clj-kondo.hooks-api :as api])
(fn [{node :node}]
(let [[_ kw & children] (:children node)
@borkdude
borkdude / repl.clj
Last active March 4, 2021 22:44
REPL session of babashka and sci internals @ London Clojurians December 2020
(ns ldnclj.repl
(:require [babashka.main :as bb]
[cheshire.core :as json]
[edamame.core :as e]
[sci.core :as sci]
[sci.impl.analyzer :as ana]
[sci.impl.interop :as interop]
[sci.impl.interpreter :as i]
[sci.impl.parser :as p]))
@yogthos
yogthos / clojure-beginner.md
Last active April 29, 2024 10:56
Clojure beginner resources

Introductory resources

@abrochard
abrochard / presentation.org
Last active March 3, 2024 12:05
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • 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
@TeMPOraL
TeMPOraL / init-web-server.el
Created April 3, 2018 21:45
Serve files over HTTP directly from Emacs.
;;;; A webserver in Emacs, because why not.
;;;; Basically a fast replacement for serve_this in Fish.
(use-package web-server
:config
(defvar my/file-server nil "Is the file server running? Holds an instance if so.")
(defun my/ws-start (handlers port &optional log-buffer &rest network-args)
@georgexsh
georgexsh / goto.py
Created September 18, 2017 07:47
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@nikital
nikital / company-insert-selected.el
Last active September 7, 2017 19:20
company-insert-selected.el
;;; company-insert-selected.el
;;
;; Similar to the way neocomplete package from Vim deals with autocompletion
;;
(defvar-local company-insert-selected--overlay nil)
(defun company--company-command-p (keys)
"Checks if the keys are part of company's overriding keymap"
(or (equal [company-dummy-event] keys)
@pahud
pahud / delete_all_awslogs.sh.md
Last active October 18, 2023 09:13
delete all aws log groups

specify the region

export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do  echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done

only delete loggroup name starting with /aws/lambda