Skip to content

Instantly share code, notes, and snippets.

@abbaspour
abbaspour / client.conf
Last active December 17, 2023 22:53
https with stunnel and socat
client = yes
debug = 5
foreground = yes
pid = /var/tmp/stunnel-client.pid
cert= st.pem
[Application]
accept = 1081
connect = 3000
@JiaHong-Lee
JiaHong-Lee / cl-dash.org
Last active May 19, 2021 20:57
Common Lisp LOOP Constructs Implementations to Emacs Dash.el

There is an interesting question on reddit: “Why [are there] so many loop variations in CL?”[fn:12]. The OP mentions that he/she is looking for something comparable to Python’s for-loop and list comprehension; or maybe something similar to the dash.el Elisp library.

As an exercise, I want to achieve what Python and dash.el can do in Common Lisp. Then, in the end, I will try coming up with something that Python and dash.el cannot do with Common Lisp.

I’ll be comparing to dash.el[fn:13] version 2.18.1. You are advise to read the following exercises with the dash.el info file opened.

[fn:12] https://old.reddit.com/r/lisp/comments/lzt9yk/why_so_many_loop_variations_in_cl/

[fn:13] https://github.com/magnars/dash.el

@roalcantara
roalcantara / 0_tldr.zsh
Last active February 17, 2026 21:11
Glob (globbing)
## TL;DR
setopt extendedglob
ls *(<tab> # to get help regarding globbing
rm ../debianpackage(.) # remove files only
ls -d *(/) # list directories only
ls /etc/*(@) # list symlinks only
ls -l *.(png|jpg|gif) # list pictures only
ls *(*) # list executables only
ls /etc/**/zsh # which directories contain 'zsh'?
@abcdw
abcdw / nix vs guix.org
Last active December 27, 2025 06:03
nix vs guix.org

Nix vs Guix

These are notes to the stream: https://youtu.be/S9V-pcTrdL8

Some notes

  • We are not aware of a lot of GNU software available to us.
  • Seems that Guix more hacker-friendly/explorable.

General comparsion

DescriptionNixGuixComment
@danieldogeanu
danieldogeanu / RenameGitBranch.md
Last active February 2, 2026 05:53
How to rename your Git master branch to main.

To rename your Git master branch to main, you must do the following steps:

  1. Navigate to your repository in the command line and issue the following commands: - git branch -m master main - git push -u origin main

  2. Change your default branch on GitHub by going to your GitHub repository in your browser, and navigate to Settings > Branches and click on the dropdown and switch from master to main and click Update (this will only show if you have two or more branches). The main branch is now your default branch.

  3. Update the tracking of the branch from your command line with the following command: - git branch -u origin/main main

@mikoim
mikoim / README.md
Last active November 27, 2023 09:22
WireGuard example configuration for VPN

Server

iptables -A FORWARD -i wg0 -o YOUR_INTERFACE -s 10.200.200.0/24 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o YOUR_INTERFACE -s 10.200.200.0/24 -j MASQUERADE

systemd-networkd

see vpn.netdev and vpn.network.

@shannonmitchell
shannonmitchell / libvirt_pcs_lab_setup.md
Last active March 16, 2022 18:01
Quick libvirt pcs lab setup

Quick libvirt pcs lab setup

To keep things simple, I'm using my local fedora 29 install with libvirt. We will also use virtualbmc to act as an ipmi interface to allow stonith with pcs. For a quicker install, I'm just using a cloud image of Centos7 with a manual configdrive iso for each vm. We will use a couple of VMs for the cluster and a 3rd for the iscsi server. I have recently found myself dealing with OSP13 which uses PCS and ISCSI, so it will be a refresher for me as well as its been a few years.

Yes we could script and/or ansible all of this shit out, but this is a learning exercise.

@chrispsn
chrispsn / kOS.md
Last active August 26, 2025 13:42
A summary of everything we know about kOS.
@mtekman
mtekman / conf.org
Last active November 22, 2020 23:58
Configs (single-file dotfiles using org-mode)
  • Global public configs for multiple utils. Makes use of tangled files.
  • C-c C-v t to export all.

First Run

Nix System

@Arano-kai
Arano-kai / duperemove-weekly@.timer
Last active October 13, 2025 12:09
SystemD service and timer templates for duperemove.
[Unit]
# Usage: systemctl enable --now duperemove-weekly@$(systemd-escape <path>).timer
# Utilize %J specifier for duration set.
# One can hardlink/copy with 'weekly' part changed
# to set other duration.
Description=Deduplicate %I at calendar event (%J)
After=local-fs.target
Requires=local-fs.target
Conflicts=shutdown.target rescue.target rescue.service emergency.service