Skip to content

Instantly share code, notes, and snippets.

@bassmanitram
bassmanitram / hack-selections.js
Created November 11, 2022 12:56
How to make Terraform 0.13 properly update a Terraform 0.12 state
/*
* Put this in a place where node can find it (referenced by $SCRIPT_HOME in the driver script)
* or figure out how to do this with JQ :)
*
* Basically, for every key that starts with "registry.terraform.io/hashicorp/" duplicate its value to
* that same key with "hashicorp" translated to "-" (keep the original property too)
*/
const fs = require("fs")
const output ={};
Object.entries(JSON.parse(fs.readFileSync( "/dev/stdin" ))).forEach(([key,value]) => {
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@g3rhard
g3rhard / docker-compose.yaml
Created July 10, 2019 06:01
docker-compose for ipsec vpn + pihole + telegram proxy
version: '2'
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
volumes:
- /etc/localtime:/etc/localtime:ro
- /dev/rtc:/dev/rtc:ro
dns:
@alranel
alranel / block_personal_appts.js
Last active January 23, 2023 15:10 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Inspired by @willroman's work but heavily changed. Instructions on how to set up can be found in the original post: https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
var source_calendars = [
'xxx',
];
function sync() {
var today = new Date();
var enddate = new Date();
enddate.setDate(today.getDate()+90); // how many days in advance to monitor and block off time
var sourceEvents = [];
@laduke
laduke / zerotier-rpi-bridge.md
Last active February 22, 2025 09:24
Various Network Configuration Output

Motivation

Use a Raspberry Pi as a bridge into my home LAN. The pi is plugged into a switch, which is plugged into an airport express, which is plugged into a cable modem; Nothing fancy.

This isn't a tutorial. Just some example output from a working setup.

steps

off the top of my head, here's the order I would do it in:

  • make sure plain old device to device zerotier is working with my LAN/Router/Firewall/ISP
@hthighway
hthighway / plexcrypt.service
Last active October 12, 2018 21:49
PlexDrive + Rclone Crypt + UnionFS Mount
[Unit]
Description=RClone Mount (crypt)
AssertPathIsDirectory=/mnt/decrypt
After=plexdrive.service
Requires=plexdrive.service
PartOf=plexdrive.service
[Service]
Type=simple
User=username
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 24, 2025 23:08
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@ValdikSS
ValdikSS / donotasktoask_ru.md
Last active February 19, 2025 19:48
Спрашивайте сразу

Вам отправили это сообщение по следующим возможным причинам:

  • Вы поприветствовались и ждете ответа
  • Вы спросили о том, можно ли задать вопрос, и ждете ответа
  • Вы скинули запрос авторизации и ждете ответа

Пожалуйста, не делайте так. Задавайте вопрос сразу, без прелюдий, без запросов авторизации (в том числе и в Jabber), и ждите ответа. Не повторяйте свой вопрос и не спрашивайте, на месте ли я.

Здесь комментарии не пишите, уведомление о них не приходит ни мне, ни вам.

Если вам интересно получить развернутый ответ и аргументы, почему не стоить здороваться и ожидать ответа при общении онлайн: