Skip to content

Instantly share code, notes, and snippets.

@nekop
nekop / dump-project.sh
Last active September 24, 2020 06:59
Old dump-project.sh for OpenShift 3.x
#!/bin/bash
# dump-project.sh PROJECT_NAME
# If you prefer multiple files, you can split it:
# zcat *.txt.gz | awk 'BEGIN{f=""} match($0, /^+ ((oc|date).*)$/, a){f=a[1] ".txt"; gsub(/[ \/=]/,"_",f);} {print $0 >> f}'
PROJECT=$1
if [ -z $PROJECT ]; then
@williamcaban
williamcaban / Simulating Bare Metal with VirtualBMC.md
Last active May 30, 2024 11:39
Bare Metal IPMI for VMs with Virtual BMC

Simulate Bare-Metal IPMI for VMs in RHEL8 Libvirt

  • Install the Virtual BMC package in the machine to use as the vBMC server. Note1: When using OpenStack repos the python3-virtualbmc RPM might be available. These instrucctions do not use that package.
    pip3 install virtualbmc
    
    • The vBMC server can be running in any machine. When using a remote libvirt server it is recommended to have passwordless authentication from the vBMC server to the libvirt machines.
    • For this document the vBMC Server export vBMCServerIP=192.168.1.13
@ssato
ssato / yum-repo-size-info-list.sh
Last active May 2, 2017 02:23
yum のリポジトリメタデータに含まれる RPM パッケージファイルのサイズ情報などからリポジトリ容量を概算
#! /bin/bash
#
# Copyright(C) 2016 Red Hat, Inc.
# Author: Satoru SATOH <ssato@redhat.com>
# License: MIT
#
# Example:
# [root@rhel-7-client-1 ~]# ./yum-repo-size-info-list.sh \
# > -r rhel-7-server-rpms -r rhel-7-server-optional-rpms \
# > -r rhel-7-server-rh-common-rpms -r rhel-7-server-extras-rpms \
@Andrewpk
Andrewpk / OSX-junos_pulse_listenToMe.sh
Last active April 16, 2022 03:01
wtf juniper. Anyone else find it irritating that junos pulse services and pulse tray must always running in OS X regardless of whether or not you're currently connected? Yeah, me too. I added the following as aliases to my shell to fix this problem. Be sure to change your /Library/LaunchAgents/net.juniper.pulsetray.plist file to reflect the `Kee…
#################################################################################
# start and stop the vpn from the command line from now on with these two commands
# or rename the aliases as you see fit.
#################################################################################
alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'"
alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist"
#!/bin/sh
set -e
ssh='ssh'
ec2din="ec2-describe-instances"
while [ $# -gt 0 ]; do
case $1 in
-*)
if [ -z "$2" ]; then
break
@toshi-kawanishi
toshi-kawanishi / git-now
Created November 18, 2010 18:44
making convenient git commit
#!/bin/sh
PREFIX="from now"
MESSAGE="[${PREFIX}] `date`"
if [ $# -eq 0 ]
then
git add -u
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
elif [ $1 != "--rebase" ]
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support