Skip to content

Instantly share code, notes, and snippets.

@cburbridge
cburbridge / Kerberos and STRANDS PDC
Last active January 15, 2016 13:12
Kerberos and STRANDS PDC access
# To get a ticket and ssh into the machine
```
kinit --forwardable burbrcjc@NADA.KTH.SE
host strands.pdc.kth.se | awk '$3 == "address" {print "host "$4}' | bash | awk '{sub(".$",""); print "kgetcred host/"$NF"@NADA.KTH.SE"}' | bash
ssh burbrcjc@strands.pdc.kth.se
```
and upload to
chris@heatwave:~$
@cburbridge
cburbridge / epoch
Created May 5, 2015 12:11
epoch to readable time
#!/usr/bin/python
import datetime
import sys
if len(sys.argv) < 2:
print "Usage: epoch <some text that has a time stap in in..>"
sys.exit(1)
for arg in sys.argv[1:]:
try:
@cburbridge
cburbridge / interfaces
Created January 21, 2015 12:04
interfaces on bob-L
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.100
dns-nameservers 192.168.0.100
@cburbridge
cburbridge / chrony.conf
Created January 21, 2015 12:03
chrony on bob-L
# This the default chrony.conf file for the Debian chrony package. After
# editing this file use the command 'invoke-rc.d chrony restart' to make
# your changes take effect. John Hasler <jhasler@debian.org> 1998-2008
# See www.pool.ntp.org for an explanation of these servers. Please
# consider joining the project if possible. If you can't or don't want to
# use these servers I suggest that you try your ISP's nameservers. We mark
# the servers 'offline' so that chronyd won't try to connect when the link
# is down. Scripts in /etc/ppp/ip-up.d and /etc/ppp/ip-down.d use chronyc
# commands to switch it on when a dialup link comes up and off when it goes
@cburbridge
cburbridge / chrony.conf
Created January 21, 2015 12:02
chrony on bob
# This the default chrony.conf file for the Debian chrony package. After
# editing this file use the command 'invoke-rc.d chrony restart' to make
# your changes take effect. John Hasler <jhasler@debian.org> 1998-2008
# See www.pool.ntp.org for an explanation of these servers. Please
# consider joining the project if possible. If you can't or don't want to
# use these servers I suggest that you try your ISP's nameservers. We mark
# the servers 'offline' so that chronyd won't try to connect when the link
# is down. Scripts in /etc/ppp/ip-up.d and /etc/ppp/ip-down.d use chronyc
# commands to switch it on when a dialup link comes up and off when it goes
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
bogus-priv
no-poll
local=/localnet/
#!/bin/bash
# Echo commands and abort on errors
set -x
set -e
# Define network interfaces:
IFACE_WAN=wlan0
IFACE_LAN=eth0
@cburbridge
cburbridge / ping-hosts
Created January 14, 2015 11:15
Script to ping all hosts in the /etc/hosts file and report there status.
#!/usr/bin/python
# Script to ping all hosts in the /etc/hosts file and report there status.
import os
from time import gmtime, strftime
with open("/etc/hosts","r") as f:
hosts = f.readlines()
print "-" * 70
@cburbridge
cburbridge / setup.sh
Last active December 18, 2015 12:29
MORSE install script
#!/bin/sh
#
# Pierrick Koch - for morse.openrobots.org
#
# Edited by Marc H
#
# This script installs MORSE, ROS, Blender and Python3.3 on Ubuntu 12.04. To use, create a local directory in home,
# cd into it and execute this script. It will ask for sudo password to install cmake, git and ros packages globally,
# all other is installed per user. Paths are set by sourcing the .bashrc inside your development directory (automatically
# sourced in ~/.bashrc by this script).