Skip to content

Instantly share code, notes, and snippets.

openstack image create --disk-format qcow2 --container-format bare --public --file ./debian-9-openstack-amd64.qcow2 debian-9-jpastor
#!/usr/bin/env bash
# The network interface
IF=eth0
# This is the list of the vip of eth0
ips=$(ip addr show dev $IF|grep "inet .*/32" | awk '{print $2}')
if [[ ! -z "$ips" ]]
then
# vip detected
echo $ips
ROOM_CONFIG = [
{
"name": "watt_cooler_ext",
"info": "Flukso exterior",
"unit": "W",
"sensor_type": "wattmeter",
"location": "cooler_electrical_board",
"coordinates": {
"x": "50%",
"y": "-5%"
@badock
badock / onewire_scanner.ino
Last active September 8, 2017 17:44
Onewire_scanner
#include <OneWire.h>
///////////////////////////////////////////////////////
// Stuff related to ds18b20
///////////////////////////////////////////////////////
// The pin for the data wire of the onewire bus
#define ONEWIRE_PIN 5
// Enable debug messages
#define DEBUG
repeatDelay 300
Line
{
name Core
flags useAlpha
life 10
// Simple bryar pistol effect
Line
{
name Core
origin 8 0 0
origin2 -80 0 0
flags useAlpha
OpenJK-MP: v1.0.1.0 macosx-x86_64 Mar 11 2017
----- FS_Startup -----
Current search path:
/Users/jonathan/Library/Application Support/OpenJK/base/assets6.pk3 (29 files)
/Users/jonathan/Library/Application Support/OpenJK/base/assets3.pk3 (16 files)
/Users/jonathan/Library/Application Support/OpenJK/base/assets2.pk3 (62 files)
/Users/jonathan/Library/Application Support/OpenJK/base/assets1.pk3 (8320 files)
/Users/jonathan/Library/Application Support/OpenJK/base/assets0.pk3 (15346 files)
/Users/jonathan/Library/Application Support/OpenJK/base
/Users/jonathan/Documents/workspace/openjk/GameData/JediAcademy/openjk.x86_64.app/Contents/MacOS/base
#!/usr/bin/env bash
set -u
set -e
set -x
# Check if the GameData folder has been provided
if [ "$1" == "" ]; then
echo "Provide the path to the Gamedata folder as first parameter"
@badock
badock / snapshot_ubuntu_1404.sh
Last active March 30, 2016 15:46
Create a snapshot of current Chameleon instance (ubuntu 14.04)
#/bin/bash
HOSTNAME=$(hostname)
UUID=$(uuidgen)
SNAPSHOT_NAME="$HOSTNAME_$UUID"
# Create a tar file of the contents of your instance:
tar cf /tmp/snapshot.tar / --selinux --acls --xattrs --numeric-owner --one-file-system --exclude=/tmp/* --exclude=/proc/* --exclude=/boot/extlinux
@badock
badock / snapshot_centos.sh
Last active March 30, 2016 14:56
Create a snapshot of current Chameleon instance (centos7)
#/bin/bash
HOSTNAME=$(hostname)
UUID=$(uuidgen)
SNAPSHOT_NAME="$HOSTNAME_$UUID"
# Install prerequisite software (only required for XFS file systems, which is the default on CentOS 7):
yum install -y libguestfs-xfs