Skip to content

Instantly share code, notes, and snippets.

View ethancedwards8's full-sized avatar
😀

Ethan Edwards ethancedwards8

😀
View GitHub Profile
@mjlbach
mjlbach / gccEmacs.md
Last active December 6, 2023 10:34
Installing gccEmacs (native-comp) with Nix

WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT

  • Native-comp was enabled by default in nixpgks
  • Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself

Nix

Adding the overlay and configuring cachix

@insdavm
insdavm / WireGuard-site-to-site.md
Last active May 3, 2024 21:19
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@analogic
analogic / docker-compose.yml
Last active February 20, 2024 14:20
Poste.io (with Lets Encrypt) + Nginx reverse proxy + Nginx Lets encrypt companion
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: nginx-proxy
restart: unless-stopped
ports:
@joepie91
joepie91 / hydra.md
Created November 26, 2017 09:31
Hydra notes

Just some notes from my attempt at setting up Hydra.

Setting up on NixOS

No need for manual database creation and all that; just ensure that your PostgreSQL service is running (services.postgresql.enable = true;), and then enable the Hydra service (services.hydra.enable). The Hydra service will need a few more options to be set up, below is my configuration for it:

    services.hydra = {
        enable = true;
 port = 3333;
@enobayram
enobayram / maybe.c
Created May 21, 2017 15:57
Maybe monad in C
#include <stdlib.h>
#include <stdio.h>
// return :: Monad m => a -> m a
typedef void * /* m a */ return_t(void * /* a */);
// type kleisli_arrow a b = a -> m b
typedef void * /* m b */ kleisli_arrow(void * /* a */);
// bind :: Monad m => m a -> (a -> m b) -> m b
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 4, 2024 16:58
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@wandernauta
wandernauta / sp
Last active April 16, 2024 15:37
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@ymmt2005
ymmt2005 / due2fs.c
Last active June 30, 2021 05:04
Fastest du for Linux. This is in fact faster than du(1) as long as all dentries are cached :-p
/**
* Compilation:
*
* 1. Without e2fslib:
* $ gcc -O2 -o due2fs due2fs.c
*
* 2. With e2fslib
* $ sudo apt-get install e2fslibs-dev
* $ gcc -DUSE_E2FSLIB -O2 -o due2fs due2fs.c -lext2fs
*