Customer: Orangutan-Roasters Project: Burundai Tasting Author: Cody Bunch Date: 2017-04-17 categories:
Some background here
| 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 "---" |
| # Install chocolatey & boxstarter | |
| Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| # Basic setup | |
| Write-Host "Setting execution policy" | |
| Update-ExecutionPolicy Unrestricted | |
| ########################################### | |
| # Update Windows and reboot if necessary # |
| #!/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. | |
| # |
| 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) |
| 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 |
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:
| #!/bin/bash | |
| # user-data-hardening.sh | |
| # Authors: Cody Bunch (bunchc@gmail.com) | |
| # | |
| # Script intended to be supplied as userdata to a cloud of some flavor. | |
| # Enables some sane sysctl defaults, turns up iptables, and | |
| # installs a HIDS / NIDS package | |
| # Supply your email here | |
| email_address="userdata@mailinator.com" |
| #!/bin/bash | |
| createTunnel() { | |
| /usr/bin/ssh -N -R 2222:localhost:22 root@remoteaccess.isa.fuckingasshat.com | |
| if [[ $? -eq 0 ]]; then | |
| echo "Tunnel up!" | |
| else | |
| echo "No such luck, Mario. Princess is $?" | |
| fi | |
| } |
| $NewDomainName = "orangutan.local" | |
| $NewDomainNetBios = "orangutan" | |
| $NumRandomGroups = 12000 | |
| $NumRandomUsers = 24000 | |
| Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| Enable-RemoteDesktop | |
| # Install chocolatey | |
| Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |