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
# First, on Windows: | |
# wsl --install ubuntu --name my-runner | |
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/010_$USER-nopasswd && sudo chmod 0440 /etc/sudoers.d/010_$USER-nopasswd | |
# Update system | |
sudo apt update && sudo apt upgrade -y | |
# Install essential tools that GitHub Actions workflows commonly expect | |
sudo apt install -y \ |
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
use std::time::{Duration, SystemTime, UNIX_EPOCH}; | |
#[tokio::main] | |
async fn main() { | |
let db = libsql::Builder::new_remote( | |
"libsql://tn-test-1757858861109-715822fe-main-resonious.aws-us-east-1.turso.io".into(), | |
"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJhIjoicm8iLCJleHAiOjE3NjY3MTk1ODIsImlhdCI6MTc1ODk0MzU4MiwiaWQiOiJmNWNiMmNjNy1iN2U2LTRlOTctYTU4YS0yOWJhYWFiNGE2MTAiLCJyaWQiOiI3MDJhMzhiYy1jM2VhLTQzNjQtOTVmMS0xZmU4OWE2MTFkNDQifQ.TnJU7f5jPzD9_gPjLK3FJqqKaPcwO9n_KGTfeRZGE5s1fbufRxEKGjFPEkBHI4hFd-A4T53Dusz71ohtn0XSAA".into() | |
) | |
.build() | |
.await |
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
// This config is in the KDL format: https://kdl.dev | |
// "/-" comments out the following node. | |
// Check the wiki for a full description of the configuration: | |
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview | |
// Input device configuration. | |
// Find the full list of options on the wiki: | |
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input | |
input { | |
keyboard { |
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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
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
{ config, lib, pkgs, ... }: | |
let | |
newpkgs = import (fetchGit { | |
url = https://github.com/NixOS/nixpkgs; | |
ref = "nixos-23.11"; | |
shallow = true; | |
allRefs = false; | |
}) {}; | |
in { |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
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 say(msg) | |
print(msg) | |
peripheral.call("left", "sendMessage", msg) | |
http.post("https://hook.snd.one/nigel/mcturtle", msg) | |
end | |
local file, err = fs.open("state", "r") | |
if err then | |
say("Hello") |
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
local tArgs = { ... } | |
if #tArgs ~= 1 then | |
print( "Usage: excavate <diameter>" ) | |
return | |
end | |
-- Mine in a quarry pattern until we hit something we can't dig | |
local size = tonumber( tArgs[1] ) | |
if size < 1 then | |
print( "Excavate diameter must be positive" ) |
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
#!/bin/bash | |
ACCOUNT_ID="c" | |
MAILBOX_ID="a" | |
AUTH="YOUR AUTH HEADER HERE" | |
UPLOAD="https://YOUR_SERVER/jmap/upload/$ACCOUNT_ID" | |
JMAP="https://YOUR_SERVER/jmap" | |
# Upload a new blob to JMAP |
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
# TO USE: | |
# $ komoju GET /api/v1/payments | |
# $ komoju POST /api/v1/sessions -d amount=100 -d currency=JPY | |
# SO EASY!!! | |
komoju() { | |
local key=${KEY-degica-mart} | |
local hats=${HATS-"https://$(ruby -r yaml -e 'puts YAML.load(File.read "#{ENV[%[HOME]]}/.kaiser/.config.yml").dig :envnames, Dir.pwd').localhost.labs.degica.com"} | |
curl -L --cookie "waf_staging_token=$WAF_STAGING_TOKEN" -u $key: -X "$1" "$hats/$2" "${@:3}" | jq | |
} |
NewerOlder