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 October 1, 2024 08:33
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 May 6, 2024 17:11
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 November 16, 2024 15:08
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 July 31, 2024 20:09
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 November 6, 2024 21:23
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
@lizrice
lizrice / kubelet-api.md
Last active October 22, 2024 16:13
Checking Kubelet API access

Accessing Kubelet API

curl -sk https://localhost:10250/pods/
  • If --anonymous-auth is turned off, you will see a 401 Unauthorized response.
  • If --anonymous-auth is true and --authorization-mode is Webhook you'll see 403 Forbidden response with message Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=proxy)
  • If --anonymous-auth is true and --authorization-mode is AlwaysAllow you'll see a list of pods.