Skip to content

Instantly share code, notes, and snippets.

IMyCockpit Cockpit;
IMyShipController ShipController;
IMyTextSurface Screen1;
List<IMyThrust> Thrusters = new List<IMyThrust>();
Vector3D LastV = new Vector3D();
void debug(String str) {
Screen1.WriteText(str, true);
}
public Program()
{
@nailgun
nailgun / ceph-edit-crush-map.sh
Last active May 9, 2017 07:17
Utility to interactively edit Ceph CRUSH map
#!/bin/bash
set -e
original_bin=$(mktemp)
original_src=${original_bin}.src
new_bin=$(mktemp)
new_src=${new_bin}.src
cleanup () {
rm -f "$original_bin" "$original_src" "$new_bin" "$new_src"
@nailgun
nailgun / ssh_key.yml
Created March 2, 2016 09:33
Ansible generate SSH key
---
- hosts: all
tasks:
- name: ensure SSH key is generated
command: ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''
args:
creates: /root/.ssh/id_rsa
@nailgun
nailgun / toolbox.sh
Created January 8, 2015 04:01
CoreOS Toolbox by DigitalOcean
#!/bin/bash
TOOLBOX_DOCKER_IMAGE=fedora
TOOLBOX_DOCKER_TAG=latest
TOOLBOX_USER=root
toolboxrc="${HOME}"/.toolboxrc
if [ -f "${toolboxrc}" ]; then
source "${toolboxrc}"