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 | |
set -e | |
version=$1 | |
if [[ -z "$version" ]]; then | |
cat << EOF | |
Usage: | |
$0 <version> |
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 | |
# setup | |
pkgpath=$1 | |
pkgout=/tmp/$(/usr/bin/openssl rand -hex 10) | |
payout=/tmp/$(/usr/bin/openssl rand -hex 10) | |
if [ -d "$pkgout" ]; then | |
echo $pkgout already exists | |
exit 1 | |
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
#!/usr/bin/env python3 | |
# references: | |
# - https://github.com/N4S4/synology-api | |
import requests | |
import argparse | |
import json | |
from getpass import getpass |
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 | |
# references: | |
# - https://medium.com/@nuwanprabhath/installing-opencv-in-macos-high-sierra-for-python-3-89c79f0a246a | |
# - https://www.learnopencv.com/install-opencv3-on-macos/ | |
# - https://bob.ippoli.to/archives/2005/02/06/using-pth-files-for-python-development/ | |
# this is probably /usr/local for you | |
BREW_ROOT="/usr/local/homebrew" |
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
#!/usr/bin/env pwsh | |
[CmdletBinding()] | |
param( | |
$IpAddress, | |
$Count = 4 | |
) | |
@' | |
var capsState; |
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 main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"runtime" |
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
# build xhyve | |
git clone https://github.com/mist64/xhyve | |
cd xhyve | |
make | |
# dump ubuntu iso to ./xhyve/ubuntu | |
mkdir ubuntu | |
cd ubuntu | |
wget http://releases.ubuntu.com/14.04.2/ubuntu-14.04.2-server-amd64.iso | |
dd if=/dev/zero bs=2k count=1 of=/tmp/tmp.iso |
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
# create hello-node deployment | |
kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node | |
# create loadbalancer service to expose hello-node pods on external network | |
kubectl expose deployment hello-node --type=LoadBalancer --port=8080 | |
# open browser to service | |
minikube service hello-node | |
# scale number of pods behind service to 3 |
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/sh | |
# install minikube | |
brew cask install minikube | |
# install and modify permission on hyperkit driver | |
brew install hyperkit docker-machine-driver-hyperkit | |
sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit | |
sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit |
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
function Get-NativeMethods | |
{ | |
[CmdletBinding()] | |
param( | |
[switch]$Unsafe | |
) | |
$Type = 'Microsoft.Win32.NativeMethods' | |
if ($Unsafe) | |
{ | |
$Type = 'Microsoft.Win32.UnsafeNativeMethods' |
NewerOlder