Skip to content

Instantly share code, notes, and snippets.

View gist:9e60feaade3404bc4cacf1bf6174c493
.
├── LICENSE
├── README.md
└── clusters
├── cluster1
│   └── flux-system
│   ├── gotk-components.yaml
│   ├── gotk-sync.yaml
│   └── kustomization.yaml
├── cluster2
@casibbald
casibbald / create_vm.sh
Created Dec 11, 2020 — forked from sickbock/create_vm.sh
VirtualBox PXE boot
View create_vm.sh
#!/bin/bash
cd ${myVMs}
MyVM=testvm
vboxmanage unregistervm ${MyVM} --delete
rm -rf ${MyVM}
mkdir ${MyVM}
cd ${MyVM}
vboxmanage createhd --filename ${MyVM}.vdi --size 30720
vboxmanage createvm --name ${MyVM} --ostype RedHat_64 --register
vboxmanage modifyvm ${MyVM} --memory 6172 --vram=12 --acpi on --nic1 NAT # optional second NIC # --nic2 bridged --bridgeadapter2 enp0s25
View pod.yaml
kind: Pod
apiVersion: v1
metadata:
name: pod-using-configmap
spec:
# Add the ConfigMap as a volume to the Pod
volumes:
# `name` here must match the name
# specified in the volume mount
@casibbald
casibbald / pod.yaml
Created Mar 29, 2019 — forked from matthewpalmer/pod.yaml
Example Kubernetes pod for the multi-container sidecar design pattern
View pod.yaml
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:
@casibbald
casibbald / install.rb
Created Mar 15, 2016 — forked from skyl/install.rb
Homebrew without sudo
View install.rb
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ''
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
HOMEBREW_CACHE = '/Library/Caches/Homebrew'
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew'
@casibbald
casibbald / install_java.yml
Created Jan 27, 2016
large downloads fail for no explicable reason
View install_java.yml
- hosts: webservers
vars:
java_minor_version: 66
osx_java_file: "jdk-8u{{ java_minor_version }}-macosx-x64.dmg"
osx_java_url: "http://download.oracle.com/otn-pub/java/jdk/8u{{ java_minor_version }}-b17"
- name: Check if Java Installed
stat: path="/Library/Java/JavaVirtualMachines/jdk1.8.0_{{ java_minor_version }}.jdk/Contents/Home/bin/java"
register: java_installed
@casibbald
casibbald / 23andme_gene_synthesis.py
Last active Sep 2, 2021
Synthesise genes for a potential child from two 23andme profiles. This is a work in progress and my still have issues.
View 23andme_gene_synthesis.py
import argparse
import os
import zipfile
from collections import Counter
# gene_set = set(['rs2015343', 'rs12203592', 'rs4778136', 'rs9782955',
# 'rs4778138', 'rs3739070', 'rs11074314', 'rs11631797',
# 'rs12914687', 'rs1667394', 'rs3794604', 'rs3947367',
# 'rs4778241', 'rs7495174', 'rs7170869',
@casibbald
casibbald / reset_simulators.py
Created Dec 9, 2015
script to reset xcode simulators
View reset_simulators.py
from __future__ import print_function
import os
import re
import subprocess
os_pattern=r'--\s(\w*\s[0-9]*.[0-9]*)\s--'
device_pattern=r'\s(\w? \w? .*)\s\((\w{8}-\w{4}-\w{4}-\w{4}-\w{12})\)\s\((\w*)\)\s(?#...\(\))?'
os_version = None
device_list = []