Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 14, 2024 18:57
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@udf
udf / write_up.md
Last active May 14, 2024 18:55
A Trick To Use mkMerge at The Top Level of a NixOS module

The Setup

I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.

I want the config to look like this:

{
  services.zfs-auto-scrub = {
 tank = "Sat *-*-* 00:00:00";
@amrza
amrza / run.py
Last active May 14, 2024 18:55
How to write RTL(Arabic/Persian) text on images in python.
# Tested on Python 3.6.1
# install: pip install --upgrade arabic-reshaper
import arabic_reshaper
# install: pip install python-bidi
from bidi.algorithm import get_display
# install: pip install Pillow
from PIL import ImageFont
@duzun
duzun / arch_enable_bbr.sh
Last active May 14, 2024 18:53
Enable TCP BBR
#!/bin/bash
#
# A script to enable TCP BBR on a Linux system.
#
# @author Dumitru Uzun (DUzun.Me)
# @version 1.0.0
# @distro ArchLinux/Manjaro
#
old_cc=`sysctl net.ipv4.tcp_congestion_control | awk -F= '{print $2}' | sed -e s/\^\\s//`
print_green "Checking POW: "
POW_PATH="${HOME}/.pow"
if [ ! -d ${POW_PATH} ]; then
print_red "failed\n"
print_red "Installing POW\n"
curl get.pow.cx | sh
print_green "Checking POW: OK\n"
else
print_green "OK\n"
fi
@davestewart
davestewart / broadcast-channel.md
Last active May 14, 2024 18:53
Example of using BroadcastChannel to communicate with pages in the same domain

screenshot

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 14, 2024 18:51
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@jvns
jvns / interview-questions.md
Last active May 14, 2024 18:47
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@ChristopherA
ChristopherA / ssh-keys-best-practices.md
Last active May 14, 2024 18:39
SSH Keys - Best Practices

SSH Keys Best Practices

(VERY rought draft, still a work-in-progress)

SSH Key Seperation

Authentication and signing keys serve different purposes, especially on platforms like GitHub where code integrity and access control are crucial. Here's a comparison based on their functions and best practices:

Authentication Keys:

  1. Purpose: