- http://askubuntu.com/questions/596386/visualizing-linux-gpt-partition-efi-from-windows-host
- http://lifehacker.com/how-to-dual-boot-and-virtualize-the-same-partition-on-y-493223329
set root=(hd0)
set prefix=(hd0)/boot/grub
insmod normal
export ROS_HOSTNAME=`grep \`ifconfig | grep -A1 ppp | grep inet | cut -f2 -d:| cut -f1 -d" "\` /etc/hosts | tr -s " " | cut -f2 -d " "` | |
echo "ROS_HOSTNAME set to $ROS_HOSTNAME" |
case $- in | |
*i*) # interactive shell | |
if [ -z "$TMUX" ]; then | |
if [ "$SSH_CLIENT" ]; then | |
TMUX_SESSION=`echo ${SSH_CLIENT} | cut -f1 -d" "` | |
echo "checking for tmux session with ID $TMUX_SESSION" | |
if tmux has-session -t "$TMUX_SESSION" > /dev/null; then | |
exec tmux at -t "$TMUX_SESSION" | |
else |
# if the rosdistro has been reconfigured to use another version, | |
# bloom needs to be told to use the official one with this env variable: | |
ROSDISTRO_INDEX_URL=https://raw.github.com/ros/rosdistro/master/index.yaml bloom-release -r indigo -t indigo mongodb_store |
sudo sysctl -a | grep \\.rp_filter | cut -f1 -d" " | xargs -i{} -- sudo sysctl -w {}=0 |
# taken from https://github.com/jordansissel/fpm/wiki/ConvertingGems#convert-a-gem-and-all-of-its-dependencies | |
sudo apt-get install ruby1.9.3 rubygems | |
mkdir /tmp/gems | |
gem1.9.3 install --no-ri --no-rdoc --install-dir /tmp/gems jekyll | |
find /tmp/gems/cache -name '*.gem' | xargs -rn1 fpm -d ruby1.9.3 -d rubygems --gem-gem /usr/bin/gem1.9.3 -s gem -t deb | |
# enable reverse port forwarding in firewall settings: | |
# 8181: mjpegserver | |
# 9090: rosws | |
# 22222: reverse ssh | |
AUTOSSH_POLL=5 AUTOSSH_FIRST_POLL=5 autossh -M 6000 harek -R8181:localhost:8181 -R9090:localhost:9090 -R22222:localhost:22 | |
# put this in your `.ssh/config` | |
Host harek | |
TCPKeepAlive yes | |
ServerAliveInterval 20 |
%%%%%%%%% | |
% Generate some test data, here 4 points p with directions d | |
% the position of the offset of the lines | |
p=[0 0; 1 0; 0 1; 1 1]'; | |
% the direction for the individual lines, not sure if this is the format that is needed or if you have the rotation matrix. | |
% If the latter then simply multiply take the first row of the rotation matrix as d_i | |
d=[1 1; -1 1; 1 -1; -1 -1]'; |
# every minute check if connection is still alive and try reconnecting if it's not | |
*/1 * * * * /usr/bin/nmcli c status id STRANDS-AAF > /dev/null || /usr/bin/nmcli c up id STRANDS-AAF |
#!/bin/sh | |
df -H | grep -vE '^Filesystem|tmpfs|cdrom|none|udev' | awk '{ print $5 " " $1 }' | while read output; | |
do | |
#echo $output | |
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
partition=$(echo $output | awk '{ print $2 }' ) | |
if [ $usep -ge 80 ]; then | |
echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)" | | |
mail -s "Alert: Almost out of disk space $usep%" root | |
fi |
set root=(hd0)
set prefix=(hd0)/boot/grub
insmod normal