Skip to content

Instantly share code, notes, and snippets.

View michaelrice's full-sized avatar

Michael Rice michaelrice

View GitHub Profile
@bretonium
bretonium / mos-websso.rst
Last active December 14, 2020 20:00
How to configure Mirantis OpenStack for WebSSO via Okta
  • To use openstack cli you need to switch it to using v3 API. Do this:
    1. cp openrc openrc.v3
    2. edit openrc.v3 and
      • add there this line: export OS_IDENTITY_API_VERSION=3
      • change OS_AUTH_URL to point to v3.
  • Create an identity provider

    openstack identity provider create idp_1 # idp_1 is an id. Use any you like. I like idp_1

@noromanba
noromanba / twitch-irc-with-weechat.mkd
Last active January 24, 2024 01:17
How to join Twitch IRC w/ WeeChat
@hartsock
hartsock / rdm.py
Last active September 11, 2015 06:49
Ideas for how to get at RDM data from pyVmomi
# first get the disks...
disks = [d for d in vm.config.hardware.device
if isinstance(d, pyVmomi.vim.vm.device.VirtualDisk) and
isinstance(d.backing, pyVmomi.vim.vm.device.VirtualDisk.RawDiskMappingVer1BackingInfo)]
print d.deviceInfo.deviceName
# then later
ss = vm.runtime.host.configManager.storageSystem
@neversleepz
neversleepz / LoggingFromConsoleScript.groovy
Created November 9, 2013 03:09
Configuring log4j for use in a groovy script. Reading log4j config (via a config slurper)
/**
* Use log4j in a groovy script, with configuration from a groovy like config file
*
* As asked in this
* <a href="http://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow question - groovy-script-and-log4j</a>
*
*
* Tested with Java 7, Groovy 2.1.9
* User: kon
* Date: 9/11/13
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ymnk
ymnk / AES.java
Last active July 20, 2023 15:54
JSch examples
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/**
* This program will demonstrate how to use "aes128-cbc".
*
*/
import com.jcraft.jsch.*;
import java.awt.*;
import javax.swing.*;
public class AES{
@robinsmidsrod
robinsmidsrod / ubuntu-amd64-installer.ipxe
Created March 27, 2012 08:52
Boot Ubuntu x64 installer directly from the network. Only iPXE needed
#!ipxe
dhcp
echo Starting Ubuntu x64 installer for ${hostname}
set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} failed

Things you’ll need:

  • A high quality smoker. Cheap smokers don’t hold consistent temperatures, and that’s the most important variable in cooking ribs
  • Baby back ribs. In San Francisco, I’ve found Golden Gate Meat Company to be the best butcher around. Wherever you live, try to find the best meat source you can.
  • A box or bag of apple wood chips. Apple tastes better than hickory or mesquite, and you don’t have to worry as much about over-smoking your meat. I hear pecan wood is also good, but it’s not readily available in California, so I’ve had no experience with it.
  • Saran wrap
  • Toothpicks
  • A spray bottle
  • Apple juice
  • Charcoal. I prefer natural lump charcoal.