Skip to content

Instantly share code, notes, and snippets.

View casibbald's full-sized avatar

Charles Sibbald casibbald

  • Bulgaria
  • 17:35 (UTC +03:00)
View GitHub Profile
@casibbald
casibbald / 23andme_gene_synthesis.py
Last active September 2, 2021 13:48
Synthesise genes for a potential child from two 23andme profiles. This is a work in progress and my still have issues.
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',
.
├── LICENSE
├── README.md
└── clusters
├── cluster1
│   └── flux-system
│   ├── gotk-components.yaml
│   ├── gotk-sync.yaml
│   └── kustomization.yaml
├── cluster2
@casibbald
casibbald / create_vm.sh
Created December 11, 2020 19:39 — forked from sickbock/create_vm.sh
VirtualBox PXE boot
#!/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
@casibbald
casibbald / pod.yaml
Created March 29, 2019 15:26 — forked from matthewpalmer/pod.yaml
Example Kubernetes pod for the multi-container sidecar design pattern
# 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:
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 / install.rb
Created March 15, 2016 21:13 — forked from skyl/install.rb
Homebrew without sudo
#!/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 January 27, 2016 16:46
large downloads fail for no explicable reason
- 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 / reset_simulators.py
Created December 9, 2015 13:52
script to reset xcode simulators
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 = []