Skip to content

Instantly share code, notes, and snippets.

View thcipriani's full-sized avatar

Tyler Cipriani thcipriani

View GitHub Profile
@thcipriani
thcipriani / Install NVIDIA Driver and CUDA.md
Created September 15, 2024 18:49 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
#!/usr/bin/env bash
# journal.sh
# ==========
#
# One daily text file to rule them all.
#
# Copyright: 2022 Tyler Cipriani <tyler@tylercipriani.com
# License: GPLv3
set -euo pipefail
@thcipriani
thcipriani / rtl-sdr-relay.service
Created May 21, 2021 05:23
RTL SDR settings for my acurite sensors
[Unit]
Description=rtl_433 to mqtt
[Service]
ExecStart=/home/pi/rtl_433_mqtt_relay.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
00001000100000001011000011101000000011100001110110000000101000000111110000010111
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00011111111111111111000001010000000010000000001001000000111000000001110000010011
00000101000000011001000111111111111111110000001101000000100100000001110000001000
00000001000000000001000001001000000001010001111111111111111111111111111111111111
#!/usr/bin/env bash
#
# Word of the Day!
#
# Get m-w.com's top word lookup of however long...
#
# USAGE:
#
# (/^ヮ^)/*:・゚✧ date -Is
# 2021-01-06T16:38:27-07:00

Cloning All Gerrit Repos

I'm doing this with the myrepos perl script. I started down the path of reimplementing a good chunk of functionality of myrepos before realizing my mistake and generating a config file instead :)

To generate the config file I used this beauty:

while read repo; do
    printf '[%s]\n%s\n\n' "${repo}.git" "checkout = git clone --mirror https://gerrit-replica.wikimedia.org/r/${repo}"

done < <(curl -sL https://gerrit.wikimedia.org/r/projects/?all | \

What nobody tells you about documentation

https://www.divio.com/blog/documentation/

Documentation makes your project more successful

  • If your project is poorly documented
    • Folks won’t use your software
    • Folks will misuse your software, even if they’re forced to use it (see also rsync)

There is no 1 documentation: there are 4 things

#!/usr/bin/env python
# Pytail
# ------
# Dumb python program that lets you tail a file while interactively filtering it
import os
import re
import select
import subprocess
import sys
import time
@thcipriani
thcipriani / how-to-do-a-code-review.org
Last active December 10, 2019 17:17
Notes for Google's Code Review best practice doc https://google.github.io/eng-practices/review/reviewer/

How to do a code review

Notes from Google’s Engineering Practices documentation

Terms

  • CL: Stands for “changelist,” which means one self-contained change that has been submitted to version control or which is undergoing code review. Other organizations often call this a “change” or a “patch.”
  • LGTM: Means “Looks Good to Me.” It is what a code reviewer says