This file contains hidden or 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
... | |
{ | |
services.samba = { | |
enable = true; | |
syncPasswordsByPam = true; | |
# You will still need to set up the user accounts to begin with: | |
# $ sudo smbpasswd -a yourusername |
This file contains hidden or 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
{ | |
description = "Basic Node/ PNPM Nix flake"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = inputs: | |
inputs.flake-utils.lib.eachDefaultSystem (system: |
This file contains hidden or 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
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
fenix.url = "github:nix-community/fenix"; | |
fenix.inputs.nixpkgs.follows = "nixpkgs"; | |
}; | |
outputs = { | |
self, |
This file contains hidden or 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 bb | |
(ns backup-directory-dangerously | |
(:require [babashka.cli :as cli] | |
[babashka.fs :as fs] | |
[babashka.process :as p] | |
[clojure.java.io :as io] | |
[clojure.string :as str])) | |
(defn abort [] | |
(println "Aborting backup") |
This file contains hidden or 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
function backup-directory-dangerously | |
read --function --prompt-str "source directory: " --shell source_dir | |
if test ! -d $source_dir | |
echo "source is not a directory" | |
echo "aborting backup duplication" | |
return 1 | |
end | |
set --function source_dir $(readlink -f $source_dir) | |
read --function --prompt-str "overwrite directory: " --shell overwrite_dir |
This file contains hidden or 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 bb | |
(ns cycle-sink | |
(:require [babashka.process :as p] | |
[clojure.pprint :as pp] | |
[clojure.string :as str])) | |
(defmacro debug [sym] `(do (println ~(keyword sym)) (pp/pprint ~sym) (println))) | |
(def sinks | |
(let [default-sink-name (->> (p/sh ["pactl" "info"]) |
This file contains hidden or 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
{ | |
"document": { | |
"block_prefix": "\n", | |
"block_suffix": "\n", | |
"color": "#d8dee9", | |
"margin": 2 | |
}, | |
"block_quote": { | |
"indent": 1, | |
"indent_token": "│ " |
This file contains hidden or 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
""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugins | |
call plug#begin() | |
Plug 'tpope/vim-sensible' | |
Plug 'tpope/vim-obsession' | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-dispatch' | |
Plug 'tpope/vim-projectionist' | |
Plug 'tpope/vim-eunuch' | |
Plug 'tpope/vim-fugitive' |
This file contains hidden or 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
; run `bb backup` to backup database | |
; run `bb restore` to restore latest backup | |
{:min-bb-version "0.4.0", | |
:tasks {; CONSTANTS | |
db-name "dev_blog", | |
backup-dir "backups", | |
now (str (java.time.LocalDateTime/now)), | |
; TASKS | |
create-backup-dir {:depends [backup-dir], :task (babashka.fs/create-dirs backup-dir)}, |
This file contains hidden or 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 bb | |
;; Replicating bash/zsh "<command> $@" in babashka | |
(require '[babashka.process :refer [process tokenize]]) | |
(def command "java -jar /deploy/zprint/zprint.jar") | |
(as-> command $ | |
(tokenize $) | |
(concat $ *command-line-args*) | |
(do @(process $ {:inherit true}) nil)) |
NewerOlder