Skip to content

Instantly share code, notes, and snippets.

@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

@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" ]
#!/bin/sh
set -e
ssh='ssh'
ec2din="ec2-describe-instances"
while [ $# -gt 0 ]; do
case $1 in
-*)
if [ -z "$2" ]; then
break
@Andrewpk
Andrewpk / OSX-junos_pulse_listenToMe.sh
Last active July 11, 2024 20:22
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 `KeepAli…
#################################################################################
# start and stop the vpn from the command line from now on with these two commands
#################################################################################
startvpn() {
sudo launchctl load -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
launchctl load -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
}
quitvpn() {
launchctl unload -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
sudo launchctl unload -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
@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 <[email protected]>
# 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 \
@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
@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