This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- references: http://apple.stackexchange.com/questions/78793/apple-script-vpn-textbox | |
tell application "System Events" | |
tell current location of network preferences | |
set VPNservice to service "VPN NAME" -- name of the VPN service | |
if exists VPNservice then | |
if current configuration of VPNservice is not connected then | |
connect VPNservice | |
else | |
error "already connected." | |
end if |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# vim: set et sts=4 sw=4 ts=4 : | |
# see also: http://www.slideshare.net/aoshiman/shizuokapy3-totp | |
import sys | |
import time | |
import hashlib | |
import hmac | |
import struct | |
import base64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://people.redhat.com/wpan/doc/rhel7/docs/dup_book.pdf | |
http://people.redhat.com/wpan/doc/rhel7/docs/How_to_Create_a_Driver_Update_Package_on_RHEL7_v0.1.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ori@freebsd-master:~/work/bhyve-script % sudo sh freebsd1 start | |
Password: | |
vmm.ko is loaded. | |
Entering vmload() | |
vmload: Attaching raw image ./vm/freebsd1/freebsd1.img for fsck | |
vmload: DEBUG: VMIMG is ./vm/freebsd1/freebsd1.img and VMDEV is md0 | |
Entering getvolpart() | |
vmload: DEBUG: fsck_ufs -y /dev/md0p2 | |
** /dev/md0p2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manglobe:~ ori$ system_profiler SPHardwareDataType | |
Hardware: | |
Hardware Overview: | |
Model Name: MacBook Pro | |
Model Identifier: MacBookPro10,1 | |
Processor Name: Intel Core i7 | |
Processor Speed: 2.7 GHz | |
Number of Processors: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manglobe:~ ori$ system_profiler SPHardwareDataType | |
Hardware: | |
Hardware Overview: | |
Model Name: MacBook Pro | |
Model Identifier: MacBookPro10,1 | |
Processor Name: Intel Core i7 | |
Processor Speed: 2.7 GHz | |
Number of Processors: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import virtinst.util | |
print "UUID:\t", virtinst.util.uuidToString(virtinst.util.randomUUID()) | |
print "MAC:\t", virtinst.util.randomMAC(type="qemu") | |
# for one-liner | |
# python -c 'from virtinst.util import *; print uuidToString(randomUUID())' | |
# python -c 'from virtinst.util import *; print randomMAC(type="qemu")' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SMCLI=/opt/IBM_DS/client/SMcli | |
contA="IP address of Controller A" | |
contB="IP address of Controller B" | |
${SMCLI} ${contA} ${contB} -c "show storagesubsystem profile;" | |
${SMCLI} ${contA} ${contB} -c "show allControllers;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Obtain kernel related errata for RHEL6 from RHN. | |
# This depends on rhnapi (https://github.com/lanky/python-rhnapi). | |
import sys | |
import re | |
import rhnapi | |
from pprint import pprint | |
from rhnapi import channel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
current_branch=$(git branch | grep '^\*' | sed -e 's/^\* //') | |
echo "==> checking current branch: ${current_branch}" | |
if [ x"${current_branch}" != x"master" ]; then | |
echo "current branch is not 'master'." | |
echo "===> checking out master..." | |
git checkout master | |
if [ x"$?" != x"0" ]; then |