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
# Source: https://github.com/b3nj5m1n/dotfiles/blob/1da98eb2745ea4b0e4b789c38a037080bbf8347f/nix/modules/nixos/dynamic-wallpaper.nix#L8 | |
# (C) https://github.com/b3nj5m1n | |
# License: AGPL v3 | |
{ | |
pkgs, | |
config, | |
lib, | |
... | |
}: | |
with lib; let |
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
(ns browser | |
(:require [etaoin.api :as eta] ;; https://clojars.org/etaoin | |
[clojure.core.async :as async])) | |
(defn debounce [in timeout-atom] | |
(let [out (async/chan)] | |
(async/go-loop [last-val nil] | |
(let [val (if (nil? last-val) (async/<! in) last-val) | |
ms @timeout-atom | |
timer (async/timeout ms) |
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, pkgs, ... }: | |
{ | |
imports = [ | |
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix> | |
./sd-image.nix | |
]; | |
system.stateVersion = "23.11"; | |
# Pi Zero 2 struggles to work without swap | |
sdImage.swap.enable = true; |
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
(ns secret-box | |
(:import | |
org.bouncycastle.crypto.generators.Argon2BytesGenerator | |
org.bouncycastle.crypto.params.Argon2Parameters | |
org.bouncycastle.crypto.params.Argon2Parameters$Builder) | |
(:require | |
[taoensso.nippy :as nippy] | |
[buddy.core.crypto :as crypto] | |
[buddy.core.codecs :as codecs] | |
[buddy.core.nonce :as nonce])) |
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 itertools import cycle | |
from datetime import date, timedelta | |
import random | |
import math | |
from tabulate import tabulate | |
# How many weeks should we generate a probenplan for? | |
weeks = 6 | |
# What date does the first probe start on? |
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
! https://raw.githubusercontent.com/arosh/ublacklist-github-translation/master/uBlacklist.txt | |
! Github fake | |
*://bleepcoder.com/* | |
*://githubja.com/* | |
*://*.gitmemory.com/* | |
*://giters.com/* | |
*://githubmemory.com/* | |
*://*.wenyanet.com/* | |
*://issueexplorer.com/* | |
*://opensourcelibs.com/* |
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
;; problem: date, time, datetime, and timestamp types in sqlite are basically just strings or numbers. | |
;; the sqlite jdbc driver doesn't coerce them into Timestamp, Date or Time types by default | |
;; but we want to use proper java.time types! | |
;; | |
;; solution: supply a builder-fn [0] that correctly returns java.sql.{Date,Time,Timestamp} types (and Boolean while were at it) | |
;; | |
;; [0]: https://cljdoc.org/d/seancorfield/next.jdbc/1.2.659/doc/getting-started/tips-tricks#sqlite | |
(def builder-fn | |
(next.jdbc.result-set/builder-adapter |
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
--- | |
# Answer from Vladimir Botka @ https://serverfault.com/questions/1040246/how-to-select-network-interface-given-ip-address-in-ansible-across-debian-and-fr/1040273#1040273 | |
# Tested on Ansible 2.10 | |
# can this be simplified? Watch https://github.com/ansible/ansible/issues/69638 | |
- name: find interface name assigned given ip address | |
hosts: all | |
vars: | |
ip_find_iface: "10.1.0.51" | |
freebsd_query: >- |
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
(:requrie [next.jdbc.result-set :as rs] | |
[next.jdbc.prepare :as prepare] | |
[gungnir.model :as model] | |
[jsonista.core :as json] | |
[honeysql.format :as hf]) | |
;; given a table | |
;; CREATE TABLE example ( id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, json_value JSONB ); | |
;; and the corresponding model | |
(model/register! |
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
prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 platform=linux) | |
make: Entering directory '/var/home/ramblurr/src/screeps/screepers/screeps-multimeter/node_modules/bufferutil/build' | |
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o | |
In file included from ../../nan/nan_converters.h:67, | |
from ../../nan/nan.h:202, | |
from ../src/bufferutil.cc:7: | |
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’: | |
../../nan/nan_converters_43_inl.h:18:51: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations] | |
18 | val->To ## TYPE(isolate->GetCurrentContext()) \ | |
| ^ |
NewerOlder