This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
config, | |
lib, | |
... | |
}: let | |
cfg = config.services.freeipa-server; | |
in { | |
options.services.freeipa-server = { | |
enable = lib.mkEnableOption "freeipa service"; | |
router = lib.mkOption { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 's) | |
(defun count-leading-whitespace (str) | |
"Count leading indentation chars in STR." | |
(let ((trimmed (string-trim-left str))) | |
(- (length str) (length trimmed)))) | |
(defun unindent-string (str) | |
"Remove common leading whitespace from each line in STR." | |
(let* ((str-as-lines (s-lines str)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; org-to-gfm --- Export a org-mode file to Github-flavored Markdown | |
;;; | |
;;; Commentary: | |
;;; To convert INPUT_FILE.org and produce OUTPUT_FILE.md, run something like: | |
;;; | |
;;; emacs -q --no-splash --no-x-resources --batch --script org-to-gfm.el INPUT_FILE.org OUTPUT_FILE.md | |
;;; | |
;;; Code: | |
(unless (require 'use-package nil t) (package-install 'use-package)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#+NAME: diff | |
#+BEGIN_SRC bash :results verbatim :exports results :wrap example diff | |
# macro used to generate inline diffs in this document | |
diff --new-line-format='+%L' \ | |
--old-line-format='-%L' \ | |
--unchanged-line-format=' %L' \ | |
<(echo "$in") <(echo "$out") ;: | |
#+END_SRC | |
#+NAME: a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local string = import "string.libsonnet"; | |
local | |
parseKey(x) = string.strip( | |
local x_ = std.splitLimit(x, " ", 1); | |
if std.length(x_) == 1 then x | |
else x_[std.length(x_) - 1] | |
), | |
parseValue(x) = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "url": "https://github.com/nixos/nixpkgs/archive/804c227b83faa017c377eb899d18e5931e0ad936.tar.gz" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3f369cf8b9f7134d0792f6b141d39b5342a8274f Mon Sep 17 00:00:00 2001 | |
From: Benjamin Staffin <[email protected]> | |
Date: Mon, 14 Jan 2019 17:27:06 -0500 | |
Subject: [PATCH] Vastly simplify setup.py for distro compatibility | |
--- | |
setup.py | 81 +------------------------------------------------------- | |
1 file changed, 1 insertion(+), 80 deletions(-) | |
diff --git a/setup.py b/setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local xorshift32(seed) = ( | |
local maxint = (1<<32) - 1; | |
// seed must be non-zero | |
local x = if seed == 0 then 4036811160 else seed; | |
local x1 = x ^ (x << 13); | |
local x2 = x1 ^ (x1 >> 17); | |
local x3 = x2 ^ (x2 << 5); | |
x3 & maxint | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**** | |
Copyright 2018 Postmates Inc | |
Copyright 2018 Benjamin Staffin | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env runhaskell | |
import System.Process (callCommand) | |
runcmd args = | |
putStrLn ("+ " ++ cmd) >> callCommand cmd | |
where cmd = unwords args | |
-- (Name of your laptop's internal display, x res, y res) | |
(internalOutput, intX, intY) = ("eDP1", 3840, 2160) |
NewerOlder