Skip to content

Instantly share code, notes, and snippets.

@dmc5179
dmc5179 / openshift4-mirror.sh
Last active September 24, 2020 11:26
Mirroring OpenShift 4 Required Images and RedHat Operator Hub Images
#!/bin/bash -xe
export OCP_RELEASE="4.5.4"
export ARCHITECTURE="x86_64"
export LOCAL_REG='localhost:5000'
export LOCAL_REPO='ocp4/openshift4'
export LOCAL_REG_INSEC='true'
export UPSTREAM_REPO='openshift-release-dev'
export OCP_ARCH="x86_64"
# Directory where OCP images are written to or read from
# When mirroring to disk
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active November 1, 2023 08:35
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
One of the biggest challenges I run into working with ESXi hosts is the lack of a real usable CLI. The remote CLI provided by VMware is clunky at best and makes administration a bit of a pain. I did some poking around and managed to find some interesting CLI commands that work for ESXi.
Most of these have no manual page but will output a help message if run by themselves. I would recommend using extreme caution and using a test host to determine the usefulness in your environment before using them on an important system. Also keep in mind that the examples that I give are not the "only" way the commands can be used.
To power on a virtual machine from the command line:
- Lists all vm's running on hypervisor and provides vmid
vim-cmd vmsvc/getallvms
@jflowers
jflowers / Vagrant-Destroy-Chef-Client.rb
Last active December 9, 2015 19:38 — forked from needle-deploy/gist:4150249
Old Vagrant destroy Chef client on vagrant destroy
module Vagrant
module Provisioners
class ChefClient < Chef
def cleanup
::Chef::Config.from_file(File.expand_path('~/chef/repo/.chef/knife.rb'))
node_name = env[:vm].config.vm.provisioners[0].config.node_name
begin
puts "Destroying node #{node_name} on Chef server"
dead_node = ::Chef::Node.load(node_name)