Skip to content

Instantly share code, notes, and snippets.

View samcday's full-sized avatar

Sam samcday

View GitHub Profile
@ZenithalHourlyRate
ZenithalHourlyRate / GUD.md
Last active March 19, 2024 13:25
Use old phone as a second display: USB GUD with postmarketOS

Demo

Xiaomi Redmi 2 with resolution 1280x720 (GUD RGB565 with compression)

9.mp4
10.mp4

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@superseb
superseb / k3s-etcd-commands.md
Last active May 22, 2024 08:24
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing
@aras-p
aras-p / preprocessor_fun.h
Last active May 23, 2024 08:26
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@voidet
voidet / Garmin2StravaSyncr.rb
Last active December 14, 2015 01:09
Plug in your Garmin, wait till it mounts. Then run the script. Happy good times.
require 'rest-client'
require 'highline/import'
require 'json'
require 'time'
@activityCount = 0
@uploadedCount = 0
@garminPath = "/Volumes/GARMIN/Garmin/Activities"
def startup()
@wolfg1969
wolfg1969 / tunnel.conf
Created September 6, 2012 07:05
autossh upstart conf
# tunnel - secure tunnel to my vps
description "ssh tunnel"
start on (local-filesystems and network-device-up IFACE!=lo)
stop on runlevel [!12345]
respawn
respawn limit 5 60 # respawn max 5 times in 60 seconds
umask 022
@fdmanana
fdmanana / gist:832610
Created February 17, 2011 20:27
The CouchDB replicator database

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics