Skip to content

Instantly share code, notes, and snippets.

@mcdamo
mcdamo / ipmi-updater.py
Last active October 19, 2024 21:28 — forked from HQJaTu/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@headius
headius / gist:1234935
Created September 22, 2011 14:38
OS X 'pickjdk' command with single-command selection and updated JDK location
#!/bin/bash
#
# Provides a function that allows you to choose a JDK. Just set the environment
# variable JDKS_ROOT to the directory containing multiple versions of the JDK
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned
# up and set appropriately.
_macosx()
{
if [ $(uname -s) = Darwin ]; then
@samuelkadolph
samuelkadolph / unicode_parser.rb
Created September 7, 2011 17:45
Turn "\\u2603" to "☃" in ruby without eval
class String
def parse_unicode
dup.parse_unicode!
end
def parse_unicode!
gsub!(/\\u([0-9a-fA-F]{4})/) { [$1.to_i(16)].pack("U") }
end
end