Skip to content

Instantly share code, notes, and snippets.

View lainiwa's full-sized avatar

lainiwa

View GitHub Profile

Basic commands to view changes/information

To get an overview of the current system:

# systemd-analyze security

You must have Systemd version >= 240 for this to work. Check with systemd-analyze --version. If not... that sucks I guess? I don't know of a way to upgrade without horribly breaking everything.

@Integralist
Integralist / Python coroutine comparison functions.py
Last active June 4, 2025 16:52
Coroutine comparison functions #python
"""the results aren't what you might expect."""
import asyncio
@asyncio.coroutine
def old_style_coroutine():
yield from asyncio.sleep(1)
async def main():
await old_style_coroutine()
@rmi1974
rmi1974 / how_to_use_git_annex_and_bup_for_managing_distributed_content.md
Last active February 20, 2023 12:35
How to use git-annex and bup for managing distributed content #git #git-annex #bup #commandlinefu

How to use git-annex and bup for managing distributed content

[git-annex][1]

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

Using bup in conjunction with git-annex

[bup: It backs things up][2]

@tomhicks
tomhicks / plink-plonk.js
Last active May 15, 2025 13:25
Listen to your web pages
@gmolveau
gmolveau / recutils_tutorial_example.md
Last active March 25, 2025 18:13
A quick tutorial / example / cheatsheet of recutils https://www.gnu.org/software/recutils

recutils tutorial example

https://www.gnu.org/software/recutils/

GNU Recutils is a set of tools and libraries to access human-editable, plain text databases called recfiles.

TO install on mac : brew install recutils

add this to a new file named books.rec

@dobesv
dobesv / gist:4f76a2095a3aa8bc20eda6b3a8e455b3
Created December 20, 2019 06:11
Example of a kubernetes cron job that dumps a postgres database and copies it to s3
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: postgres-backup
spec:
schedule: "0 12 * * *"
jobTemplate:
spec:
backoffLimit: 0
template:
@lizthegrey
lizthegrey / attributes.rb
Last active July 17, 2025 01:43
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active June 10, 2025 07:56
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@nzec
nzec / README.MD
Last active July 8, 2025 18:22
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb

Crafting a Compiler from Scratch: Implementation Notes

For the past two weeks or so, I've been working on a little compiler project in C, mostly for educational purposes, i.e. to understand how a compiler really works. I'm not using any libraries, other than the C runtime library.

Introduction

I have a hand-written lexer and parser, and a simple code generator targetting