Skip to content

Instantly share code, notes, and snippets.

View rphillips's full-sized avatar

Ryan Phillips rphillips

  • Red Hat
  • Austin, TX
View GitHub Profile
@candlerb
candlerb / go-project-layout.md
Last active April 24, 2024 19:22
Suggestions for go project layout

If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"

Single executable

Stage 1: single source file

Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:

@eyeseast
eyeseast / python.md
Last active November 6, 2023 01:32
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 25, 2024 03:57
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@zobayer1
zobayer1 / fedora_post_install.md
Last active April 4, 2024 12:06
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname

@sjenning
sjenning / upstream-kubelet-backports.sh
Created March 11, 2020 15:42
Monitor upstream kubelet backports
#!/bin/sh
set -eu
cd $GOPATH/src/k8s.io/kubernetes
for release in "1.15" "1.16" "1.17"; do
echo "=== v${release} ==="
git log --oneline --no-merges v${release}.0..upstream/release-${release} -- pkg/kubelet cmd/kubelet
done
@tarnacious
tarnacious / build-qcow2.nix
Last active February 22, 2024 01:22
Build a bare bones bootable nixos qcow2 image suitable for running with libvirt/qemu/kvm.
{ config, lib, pkgs, ... }:
with lib;
{
imports =
[
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./machine-config.nix
];
@ironcladlou
ironcladlou / Vagrantfile
Last active May 22, 2019 07:58
OpenShift 4.0 Installer on macOS
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/fedora28"
config.vm.network "public_network"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
config.vm.provider "vmware_desktop" do |v|
v.ssh_info_public = true
v.vmx["numvcpus"] = "2"
function kpod() {
local CMD=(kubectl get pods --no-headers)
local NAMESPACE="$1"
if [ -n "$NAMESPACE" ]; then
CMD+=(--namespace "$NAMESPACE")
fi
"${CMD[@]}" | fzf --select-1 | awk '{print $1}'
}
function kcontainer() {
@sjenning
sjenning / tectonic-installer-notes.txt
Last active September 20, 2018 03:19
tectonic installer notes
instances start with rhcos image + ignition configs (per role) generated by "tectonic init"
for aws: user_data
for libvirt: qemu_fw_cfg
== master ===
kubelet.service starts
runs bootstrap control plane runs as static pods on the bootstrap master
bootkube.service starts
runs kube-core-renderer container
https://github.com/coreos-inc/tectonic-operators/blob/master/renderer/Documentation/README.md
@areinisc
areinisc / README.md
Last active September 3, 2018 13:20
PHOTOMETRY --- doom-emacs -- automatic theme adjustment based on ambient light

Adding automatic light/dark theme switching to doom-emacs running on a mac with ambient light sensor.

Idea adapted from: Matt Bilyeu https://matthewbilyeu.com/blog/2018-04-09/setting-emacs-theme-based-on-ambient-light

Installation

  1. Make the lmutracker executable using clang and place it in your custom doom directory:
    $ cd ~/.doom.d/    # start in your custom doom directory, wherever that is for you.
    

$ touch lmutracker.mm # copy in the contents of this file however you like