Skip to content

Instantly share code, notes, and snippets.

View slashtechno's full-sized avatar
🚀
Floating through space 🌌 🌎

slashtechno

🚀
Floating through space 🌌 🌎
View GitHub Profile
@onespaceman
onespaceman / STYLES.css
Last active April 10, 2024 01:11
silverbullet theme
html {
--crust: #dce0e8;
--mantle: #e6e9ef;
--base: #eff1f5;
--surface0: #ccd0da;
--surface1: #bcc0cc;
--surface2: #acb0be;
--overlay0: #9ca0b0;
--overlay1: #8c8fa1;
--overlay2: #7c7f93;
@thegamecracks
thegamecracks / README.md
Last active January 18, 2024 01:24
Using python -m to invoke modules as scripts

Using python -m to invoke modules as scripts

Prologue

You might have seen the -m flag used in various python commands online, or was told by someone else to use python -m to "run a module as a script", but didn't really understand what that meant. This gist covers how that flag is used, particularly in the context of package development.

Introduction to modules and packages

@solarkraft
solarkraft / syncthing-automerge.py
Created December 30, 2022 18:00
Monitors a Syncthing-synced directory and tries to merge conflicting files (based on https://www.rafa.ee/articles/resolve-syncthing-conflicts-using-three-way-merge/). Probably adaptable for other directory types, but only tested with Logseq (works for me™️).
import os
import time
import re
import subprocess
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
def get_relative_path(path):
return os.path.relpath(path)
@slashtechno
slashtechno / xfce-ubuntu.md
Created May 21, 2021 23:08
Install Xfce or Xubuntu and Uninstall

How to install XFCE or Xubuntu Desktop enviroment on Ubuntu and unninstall

Install XFCE

sudo apt install xfce4

Install Xubuntu

sudo apt install xubuntu-desktop

Uninstall XFCE

sudo apt purge xubuntu-icon-theme xfce4-* && sudo apt autoremove

@hahwul
hahwul / golang-custom-flag-usage.go
Created February 13, 2021 14:36
Golang custom flag usage
package main
import (
"flag"
"fmt"
)
func main() {
flag.String("a", "", "flag 1")
flag.String("b", "", "flag 2")
flag.String("c", "", "flag 3")
@oofnikj
oofnikj / answerfile
Last active April 26, 2024 17:13
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@Ta180m
Ta180m / WSL 2 GNOME Desktop.md
Last active May 2, 2024 22:49
Set up a GNOME desktop environment on WSL 2

WSL 2 GNOME Desktop

NOTE: If you want the ultimate Linux desktop experience, I highly recommend installing Linux as your main OS. I no longer use Windows (except in a VM) so I will not be maintaining this guide anymore.

Think Xfce looks dated? Want a conventional Ubuntu experience? This tutorial will guide you through installing Ubuntu's default desktop environment, GNOME.

GNOME is one of the more complex — and that means more difficult to run — desktop environments, so for years people couldn't figure [o

@awabcodes
awabcodes / systemd-service-config.md
Last active June 18, 2022 20:42
[Systemd Config] #systemd #linux #systemd_service

Create a systemd service

sudo nano /etc/systemd/system/webapp.service
[Unit]
Description=Webapp Service
[Service]
User=username
@csinghdev
csinghdev / apache_virtualhost_example.conf
Created March 14, 2020 11:52
Apache virtual host conf file
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
<Directory /var/www/example/>