A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
require 'rubygems' | |
require 'yaml' | |
# A demonstration of YAML anchors, references and handling of nested values | |
# For more info, see: | |
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
stooges = YAML::load( File.read('stooges.yml') ) | |
# => { | |
# "default" => { |
// ghprb 1.29.2 | |
import java.lang.reflect.Field | |
import jenkins.model.* | |
import org.jenkinsci.plugins.ghprb.* | |
def descriptor = Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.ghprb.GhprbTrigger.DescriptorImpl.class) | |
Field auth = descriptor.class.getDeclaredField("githubAuth") | |
auth.setAccessible(true) |
000000 Officially Xerox | |
000001 SuperLAN-2U | |
000002 BBN (was internal usage only, no longer used) | |
000003 XEROX CORPORATION | |
000004 XEROX CORPORATION | |
000005 XEROX CORPORATION | |
000006 XEROX CORPORATION | |
000007 XEROX CORPORATION | |
000008 XEROX CORPORATION | |
000009 powerpipes? |
In order of first appearance in The Morning Paper.
Example output:
root@chef:~# ./chef_server_nodes_report.rb -h
Usage: chef_server_nodes_report.rb [options]
-g, --group-by TYPE Group results by: ["version", "org", "environment", "check_in_month", "check_in_date", "platform_family", "platform_version", "platform", "os"]
root@chef:~# ./chef_server_nodes_report.rb --group-by version
loading config from /etc/opscode
{
In absolutely no order
#!/bin/bash | |
FLAGS="" | |
SOURCE="docker.io/library" | |
DEST="docker.io/brandond" | |
IMAGE="busybox" | |
TAG="1.32.0-uclibc" | |
docker buildx imagetools inspect ${SOURCE}/${IMAGE}:${TAG} --raw | \ | |
jq -r '.manifests[] | (.digest + " " + .platform.architecture)' | \ |
# Run the export command of nvidia-mig-parted | |
nvidia-mig-parted export | |
# Show nvidia-smi on the host with 8 full GPUs | |
nvidia-smi -L | |
# List out the NVIDIA container toolkit packages installed | |
dpkg -l | grep nvidia-container; dpkg -l | grep nvidia-docker | |
# Show that docker is configured to run with the nvidia container toolkit |