Customer: Orangutan-Roasters Project: Burundai Tasting Author: Cody Bunch Date: 2017-04-17 categories:
Some background here
oc login -u system:admin | |
cat <<-EOF > /tmp/pv.yaml | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv0001 | |
spec: | |
capacity: | |
storage: 1Gi |
#!/bin/bash - | |
# For our random naming | |
export ADJS=(autumn hidden bitter misty silent empty dry dark summer icy delicate quiet white cool spring winter patient twilight dawn crimson wispy weathered blue billowing broken cold damp falling frosty green long late lingering bold little morning muddy old red rough still small sparkling shy wandering withered wild black young holy solitary fragrant aged snowy proud floral restless divine) | |
export NOUNS=(waterfall river breeze moon rain wind sea morning snow lake sunset pine shadow leaf dawn glitter forest hill cloud meadow sun glade bird brook butterfly bush dew dust field fire flower firefly feather grass haze mountain night pond darkness snowflake silence sound sky shape surf thunder violet water wildflower wave water resonance sun wood dream cherry tree fog frost voice paper) | |
sample() { | |
# Generate random name | |
eval "echo \${$1[\$RANDOM%\${#$1[@]}]}" |
$newDomainName="orangutan.local" | |
$newDomainNetBios="orangutan" | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
# Install some useful packages | |
cinst git | |
cinst git-credential-winstore | |
cinst console-devel |
require 'fileutils' | |
task :post do | |
title = ENV['title'] || "new-post" | |
tags = ENV['tags'] || '' | |
layout = ENV['layout'] || 'post' | |
make_img_dir = ENV['imgdir'] || false | |
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d') | |
filename = File.join('/paht/to/drafts/', "#{Time.now.strftime('%Y-%m-%d')}-#{title.strip.gsub(' ', '-').gsub(/[^\w-]/, '')}.md") | |
open(filename, 'w') do |post| | |
post.puts "---" |
#!/bin/bash | |
# | |
# @script damnit_fusion.sh | |
# @description Fusion Networking hates me | |
# | |
# $ ~/damnit_fusion.sh | |
# | |
# Be default will perform a gentle restart of VMware Fusion networking. | |
# When that is not enough set FROM_ORBIT to true and try again. | |
# |
FROM arm32v6/alpine:3.6 | |
RUN apk --no-cache add bash python python-dev py-pip build-base curl | |
RUN pip install RPi.GPIO Flask flask_restful | |
COPY ./fan.py /fan.py | |
EXPOSE 80 |
import RPi.GPIO as io | |
from flask import Flask, jsonify | |
from flask_restful import Resource, Api | |
# Set our initial state | |
power_pin = 21 | |
fan_status = False | |
# Initialize GPIO, and ensure fan is off | |
io.setmode(io.BCM) |
pip install sometimes calls setup.py, which makes it ignore the offline params you specified for pip. To get around that, you need to create a file ~/.pydistutils.cfg
This will create said file:
echo -e '[easy_install]\nallow_hosts = 10.10.120.20\nfind_links = http://10.10.120.20/pypi/simple\nindex-url = http://10.10.120.20/pypi/simple' | tee ~/.pydistutils.cfg
The file looks like this: