Skip to content

Instantly share code, notes, and snippets.

View Ramblurr's full-sized avatar

Casey Link Ramblurr

View GitHub Profile
@plmercereau
plmercereau / raspberry-pi-zero-2.nix
Last active November 3, 2024 12:29
Nix module to create SD images for Rasperry Pi Zero 2 W
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix>
./sd-image.nix
];
system.stateVersion = "23.11";
# Pi Zero 2 struggles to work without swap
sdImage.swap.enable = true;
@DelusionalAI
DelusionalAI / gist:c3bfa05b5268a96f8a0c527ceace5f1b
Last active November 10, 2023 10:27
ESPHome Fallback config example.
output:
- platform: gpio
pin: GPIO4
id: shelly_25_relay_1
- platform: gpio
pin: GPIO15
id: shelly_25_relay_2
fan:
- platform: binary
@pamolloy
pamolloy / README.md
Last active October 16, 2024 20:40
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@krisleech
krisleech / 00-ideavimrc
Last active March 8, 2023 14:23
vimrc for IDEAvim plugin for IntelliJ IDEA IDE with Cursive plugin. #clojure #vim
set surround
set hlsearch
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
set relativenumber
set number
@vidia
vidia / nginx-unificontroller.conf
Last active November 4, 2024 10:16
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@tybl
tybl / budget.ledger
Created May 27, 2017 14:57
YNAB budgeting with ledger-cli
; This is a simple method of maintaining a budget using
; double-entry accounting software.
; Usually, double-entry accounting keeps track of
; assets, liabilities, income, and expenses. However,
; income/expense categories are different than budget
; categories. For one thing, income/expense categories
; continually grow, where budget categories tend to rise
; and fall. I decided to replace tracking my income/
; expenses with tracking my budget.
@lopezjurip
lopezjurip / README.md
Created December 16, 2016 21:08
macOS: Yarn + nvm with globals (bins) to $PATH

Yarn and nvm

  • Requisites: brew

Install nvm:

brew install nvm
@yan-foto
yan-foto / OpenWRT | OpenVPN | PIA - README.md
Last active January 5, 2020 22:25
OpenWRT configurations to run OpenVPN client | Private Internet Access - https://www.privateinternetaccess.com

This gist contains all the OpenWRT configuraion files needed to connect to Private Internet Access (PIA) VPN servers. The following files are included:

  • network: contains configuration to add a virtual network device (i.e. tun1366) and custom DNS servers
  • openvpn: OpenVPN configuration file to connect to PIA VPN servers
  • firewall: firewall configuration which passes all traffic through VPN and rejects any request when OpenVPN is down

NOTE: there are a number of other files required to be available under /etc/openvpn for this approach to work:

  • pia.auth: VPN credentials in two lines, first the username and the second the password
@mediavrog
mediavrog / IconizedMenu.java
Last active September 17, 2022 13:17
Android Compatibility popup menu with icons (requires support library v7)
/**
* Seems like the only way to use it currently (as of 10/2018) is through reflection
* see https://resocoder.com/2018/02/02/popup-menu-with-icons-android-kotlin-tutorial-code/
**/
package com.vuzz.snapdish.ui;
import android.content.Context;
import android.support.v7.internal.view.SupportMenuInflater;
import android.support.v7.internal.view.menu.MenuBuilder;
@lzubiaur
lzubiaur / svgexport.py
Last active February 5, 2018 10:47
Batch export for Inkscape
#!/usr/bin/env python
# -*- coding: latin-1 -*-
"""
svgexport.py - Batch export for Inkscape - Laurent Zubiaur
description:
Python script that can be used to automate batch exports of Inkscape objects by providing their id (set in the Object Properties dialog).
Also useful to batch export with a specific dpi (only available for individual object export in GUI mode).
For all available inkscape command line options see http://inkscape.org/doc/inkscape-man.html.