Mix.install(
[
{:exgboost, "~> 0.3.1", override: true},
{:nx, "~> 0.6"},
{:exla, "~> 0.5"},
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/bash | |
# zn - as zettell | |
# new export variables EDITOR for your editor and | |
#+ NOTES for your notes folder. | |
main () { | |
note_id=$(date +'%Y%m%d%H%M%S') | |
$EDITOR $NOTES/"$note_id".md | |
} |
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
wrap any function in | |
javascript: (function () { | |
// javascript goes here | |
})(); | |
minify and then create a bookmark with the URL as the minified JavaScript | |
// grayscale all images without an alt tag | |
const css = document.createElement("style"); |
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
-- Define the events that should trigger the startWorkDay function | |
local startWorkDayEvents = { | |
hs.caffeinate.watcher.systemDidWake, | |
hs.caffeinate.watcher.screensDidUnlock, | |
hs.caffeinate.watcher.screensaverDidStop | |
} | |
-- Function to check if the event should trigger the startWorkDay function | |
local function shouldTriggerStartWorkDay(eventType) | |
for _, startWorkDayEvent in ipairs(startWorkDayEvents) do |
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
# Usage: | |
# - pip install marko (in a venv or system wide if you want) | |
# - python logseq_to_org.py <logseq's pages directory> <output folder> | |
import datetime as dt | |
import re | |
import sys | |
import uuid | |
from contextlib import contextmanager | |
from dataclasses import dataclass, field |
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
---@param types string[] Will return the first node that matches one of these types | |
---@param node TSNode|nil | |
---@return TSNode|nil | |
local function find_node_ancestor(types, node) | |
if not node then | |
return nil | |
end | |
if vim.tbl_contains(types, node:type()) then | |
return node |
- Create a Droplet on e.g. DigitalOcean.
- Make sure it has at least 1 vCPU and 1 GB of memory.
- Mine has: 1 vCPU, 1 GB, 35 GB NVMe SSD, Premium Intel CPU, Ubuntu 24.04 LTS for $8/month on Digital Ocean
- Choose SSH KEY AUTHENTICATION and create a new SSH key.
- Remember the server's IPv4 address.
- Sign up for a Container Registry e.g. on Digital Ocean for $5/mo (the 500MB free plan won't cut it)
- Remember your username on the registry
- Create an API Token at https://cloud.digitalocean.com/account/api/tokens for pushing images to the registry.
- It needs to have these scopes:
registry (4): delete, update, read, create
- It needs to have these scopes:
- Install Kamal with
gem install kamal
OlderNewer