This file contains 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
if [ -d $HOME/bin ]; then export PATH=$HOME/bin:$PATH ; fi | |
# interactive only below this point | |
if [ -t 1 ]; then | |
export SOURCE_IP=`echo $SSH_CONNECTION | awk '{print $1}'` | |
export CURRENT_IP=`echo $SSH_CONNECTION | awk '{print $3}'` | |
if [[ ! -z "${CURRENT_IP}" ]]; then | |
export PS1="${CURRENT_IP}:\w $ " | |
fi | |
echo "" | |
fi |
This file contains 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/bash | |
SRC=$1 | |
DST=$2 | |
if [[ -z ${SRC} ]]; then echo "No source dir"; exit 1; fi | |
if [[ -z ${DST} ]]; then echo "No destination dir"; exit 1; fi | |
for d in $(ls $SRC); do | |
if [ -d "$SRC/$d" ]; then | |
CMD="rsync -r $SRC/$d/ $DST/$SRC/$d" |
This file contains 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
1. Lift Weights | |
2. Sleep Well | |
3. Intermittent Fasting? Dietary Ketosis? | |
4. Cholesterol / Zinc / Magnesium / Vitamin D3 | |
5. Lower Estrogen: Weight Loss, No BPA | |
6. Reduce Stress | |
7. Increase Androgen Receptors: L-Carnitine & L-Tartrate / Reduce over stimulation |
This file contains 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
from pyVmomi import vim | |
spec = vim.vm.device.VirtualDiskSpec() | |
spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add | |
spec.fileOperation = vim.vm.device.VirtualDeviceSpec.FileOperation.create | |
spec.device = vim.vm.device.VirtualDisk( | |
capacityInBytes=capacity_bytes, | |
capacityInKB = capacity_kb, | |
connectable = vim.vm.device.VirtualDevice.ConnectInfo( | |
startConnected = True, |
This file contains 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
git clone [email protected]:[your fork of the upstream repo] | |
cd [repo name] | |
git remote add upstream https://github.com/[upstream repo] | |
git fetch --all | |
git pull upstream master | |
git push origin master | |
git checkout -b issue12345 | |
# ... edit files ... | |
git commit -a -m 'fixed issue12345' | |
git push -u origin issue12345 |
This file contains 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
# How to create an RPM repository | |
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages. | |
# | |
# See "How to create an RPM from source with spec file" for more information. | |
# https://gist.github.com/1376973 | |
# Step: 1 | |
# Install createrepo |
This file contains 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
$ sudo gvim /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf | |
host phodev { | |
hardware ethernet 00:0c:29:ab:9a:11; | |
fixed-address 192.168.218.10; | |
} |
This file contains 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
Installed Packages | |
Linux-PAM.x86_64 1.2.1-3.ph1 installed | |
Linux-PAM-lang.x86_64 1.2.1-3.ph1 installed | |
PyYAML.x86_64 3.11-2.ph1 installed | |
XML-Parser.x86_64 2.44-2.ph1 installed | |
acl.x86_64 2.2.52-2.ph1 installed | |
apache-maven.noarch 3.3.9-4.ph1 installed | |
apr.x86_64 1.5.2-6.ph1 installed | |
apr-devel.x86_64 1.5.2-6.ph1 installed | |
apr-util.x86_64 1.5.4-7.ph1 installed |
This file contains 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
package com.example; | |
import com.wordnik.swagger.annotations.ApiParam; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
import javax.ws.rs.core.Response; |