Skip to content

Instantly share code, notes, and snippets.

View onetom's full-sized avatar

Tamas Herman onetom

View GitHub Profile
#!/usr/bin/env bash
#
# Usage
#
# python2nix my_pypi_package > my_package.nix
#
# TODO
# - accept 'format' as arg
# - prepopulate dependencies?
set -euo pipefail
@maacl
maacl / core.clj
Last active January 29, 2023 07:07
Domain Modelling using Clojure
(ns pms.core
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.spec.test.alpha :as stest]))
(comment "This is a small experiment inspired by Oskar Wickströms
excellent work at
https://haskell-at-work.com/episodes/2018-01-19-domain-modelling-with-haskell-data-structures.html. I
wanted to see what would be involved in building the equivalent
functionality in reasonably ideomatic Clojure. It is also my first
@micha
micha / paging.clj
Last active September 12, 2016 15:27
(ns ui.paging
(:require [hoplon.core :refer (def-values)]))
(defmacro defp
[name & args]
`(def ~name (paginate ~@args)))
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active March 15, 2024 00:21
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.

The best:

@jaeschliman
jaeschliman / emacs-set-app-icon.m
Created January 24, 2014 03:18
change the Emacs.app application icon while it's running
/*
I typically run several emacs instances at once,
One handling IM and my timecard etc,
and one for each project I'm currently working on.
This way I can tailor a given instance of emacs to a given project
as much as I want without interfering with the others,
it simplifies buffer-switching and desktop saving etc.
But it gets to be a PITA command-tabbing between them as they all have the same icon.
This fixes that.