Skip to content

Instantly share code, notes, and snippets.

View AceofSpades5757's full-sized avatar
🌐
Homelab Maintenance

Kyle L. Davis AceofSpades5757

🌐
Homelab Maintenance
View GitHub Profile
@Trebor-Huang
Trebor-Huang / lc.typ
Last active August 29, 2024 22:09
Evaluator for lambda calculus in Typst
// *** Jump to the bottom for example usage ***
#set page(paper: "a5")
#let Lam(var, body) = ("Lam", var, body)
#let App(fun, arg) = ("App", fun, arg)
// An elaborate pretty printer because I'm bored
#let print-var(str) = if str.starts-with("@") {
$x_#str.slice(1)$ // generated variable name
@AnnMarieW
AnnMarieW / figure_friday_2024_week_32.py
Last active October 16, 2024 06:40
figure_friday_2024_week_32
# Plotly's Figure Friday challenge. See more info here: https://community.plotly.com/t/figure-friday-2024-week-32/86401
import dash
import pandas as pd
from dash import Dash, html, dcc, Input, Output, State, callback, Patch
import dash_bootstrap_components as dbc
import dash_ag_grid as dag
import plotly.graph_objects as go
app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
@lxl66566
lxl66566 / test.py
Created May 11, 2024 04:42
Typst table with merged cells from excel (forwarded)
import win32com.client
excel = win32com.client.GetActiveObject("Excel.Application")
wb = excel.ActiveWorkbook
sheet = wb.ActiveSheet
selected = excel.Selection
columns = selected.Columns.Count
out = open("output.typ", "w", encoding="utf-8")
out.write(f"#table(columns: {columns}, ")
@sebastiancarlos
sebastiancarlos / show_notifications.bash
Last active July 23, 2024 08:43
Show notifications in your terminal
# All my gist code is licensed under the terms of the MIT license.
# Video demo: https://www.youtube.com/shorts/WVyqVkGYb4k
# Add this somewhere in ~/.bashrc
# write_message
# - write a message on the lower right corner of the terminal
function write_message () {
if [[ "$#" -eq 0 ]]; then
@flatcapital
flatcapital / Cargo.toml
Created February 26, 2023 22:48
Candle aggregator example
[package]
name = "demo"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# async
@sts10
sts10 / rust-command-line-utilities.markdown
Last active November 27, 2024 00:11
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
- This page is a collection of some of the Advanced queries from the [[Datalog]] channel on the [[Logseq/Discord]] server. #datalog
id:: 61db13f4-75e8-4f87-ad60-3ac3479c5fc8
- ### Resources
- [link: The first message on the datalog channel](https://discord.com/channels/725182569297215569/743139225746145311/743139795865174119)
- [link: Logseq docs - Advanced queries](https://docs.logseq.com/#/page/advanced%20queries)
- [link: Logseq datascript schema](https://gist.github.com/tiensonqin/9a40575827f8f63eec54432443ecb929)
- [link: Logseq frontend db model](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs)
- [link: How to Graph Your Data - talk by Paula Gearon](https://youtu.be/tbVwmFBnfo4)
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](https://youtu.be/oo-7mN9WXTw)
- [link: Athens Research ClojureFam](https://github.com/athensresearch/ClojureFam)
@corlaez
corlaez / README.md
Last active November 13, 2024 22:11
Hexagonal Architecture and Modular Implementation

Hexagonal Architecture

Conceptualized by Alistair Cockburn. Also known as "Ports and Adapters".

In a nutshell:

Application Driver -> Primary Adapter -> Primary Port -> Use Case -> Secondary Port -> Secondary Adapter -> External System/Side Effect
@NicolasBizzozzero
NicolasBizzozzero / comprehensive_header.py
Last active September 21, 2024 16:59
Python template of a comprehensive header, with shebang, docstring, GPLv3 license and all metadata.
#!/usr/bin/env python
""" Short description of this Python module.
Longer description of this module.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.