Skip to content

Instantly share code, notes, and snippets.

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

Angad Behl slashtechno

🚀
Floating through space 🌌 🌎
View GitHub Profile
@mecaneer23
mecaneer23 / get-url.sh
Created June 19, 2024 20:34
Run in a git directory to print the most recent github commit link for that directory
get-recent-commit-url() {
echo "$(git remote get-url origin)/commit/$(git log -n 1 | grep commit | awk '{print $2}')"
}
get-recent-commit-url
@onespaceman
onespaceman / STYLES.css
Last active July 15, 2024 15:37
silverbullet theme
html {
--crust: #dce0e8;
--mantle: #e6e9ef;
--base: #eff1f5;
--surface0: #ccd0da;
--surface1: #bcc0cc;
--surface2: #acb0be;
--overlay0: #9ca0b0;
--overlay1: #8c8fa1;
--overlay2: #7c7f93;
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active July 23, 2024 05:06
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@thegamecracks
thegamecracks / README.md
Last active May 8, 2024 01:20
Using python -m to invoke modules as scripts

Using python -m to invoke modules as scripts

Note

Hey there! This gist has been rewritten in my GitHub blog. You should read that instead!

Prologue

You might have seen the -m flag used in various python commands online,

@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 July 20, 2024 07:10
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"
@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