Skip to content

Instantly share code, notes, and snippets.

View latipun7's full-sized avatar
:octocat:
Life is hard.

Latif Sulistyo latipun7

:octocat:
Life is hard.
View GitHub Profile
@ongyx
ongyx / setup_rich_presence_relay.sh
Last active July 17, 2024 19:26
This script sets up a relay for Discord Rich Presence on WSL2 for https://github.com/andweeb/presence.nvim. Note that this has only been tested on Arch Linux which uses the systemd init system.
#!/bin/bash
EXE='npiperelay.exe'
export GOOS=windows
export GOARCH=amd64
GO_BIN="$(go env GOPATH)/bin/${GOOS}_${GOARCH}"
msg () {
@nothub
nothub / info.txt
Last active February 20, 2023 13:40
updated asciiquarium
This project has moved to: https://github.com/nothub/asciiquarium
@albertored11
albertored11 / yaycache
Last active August 25, 2023 16:49
Script and hook to clean pacman and yay cache
#!/usr/bin/env bash
# Assuming yay is run by user with UID 1000
admin="$(id -nu 1000)"
cachedir="/home/$admin/.cache/yay"
removed="$(comm -23 <(basename -a $(find $cachedir -mindepth 1 -maxdepth 1 -type d) | sort) <(pacman -Qqm) | xargs -r printf "$cachedir/%s\n")"
# Remove yay cache for foreign packages that are not installed anymore
rm -rf $removed
@XSystem252
XSystem252 / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active July 5, 2024 02:33
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@Fobxx
Fobxx / shige-skins.md
Last active June 16, 2024 19:08
Shigetora skins
@fnky
fnky / ANSI.md
Last active July 26, 2024 02:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@HaleTom
HaleTom / print256colours.sh
Last active June 29, 2024 16:16
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@Francesco149
Francesco149 / shige-skins.md
Last active March 31, 2024 14:53
Shigetora / Cookiezi skin compilation
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers