This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import requests | |
import xlsxwriter | |
from datetime import datetime | |
from pprint import pprint | |
protocol = 'http' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo fallocate -l 4G /swap | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4194304 | |
sudo chmod 600 /swap | |
sudo mkswap /swap | |
sudo swapon /swap | |
echo "/swap swap swap defaults 0 0" | sudo tee -a /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <locale.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
#include <sys/ioctl.h> | |
#include <fcntl.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To install systemrescuecd on PXE: | |
# change the version number | |
version=3.2.0 | |
wget -c http://aarnet.dl.sourceforge.net/project/systemrescuecd/sysresccd-x86/$version/systemrescuecd-x86-$version.iso | |
# mount the cdrom image: | |
mount -o loop systemrescuecd-x86-${version}.iso cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dist=quantal | |
for arch in amd64 i386 ; do | |
wget -c http://mirror.aarnet.edu.au/ubuntu/dists/${dist}/main/installer-${arch}/current/images/netboot/netboot.tar.gz | |
tar xf netboot.tar.gz ./version.info | |
version=`cat ./version.info | grep "Ubuntu version" | sed -e "s/Ubuntu version: *\(.*\) *$/\1/"` | |
rm ./version.info | |
echo "Installing tftp files for ubuntu ${version} - ${arch}" | |
if [ -d ${version}/${arch} ] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout master | |
git remote prune origin | |
for b in $(git branch -v | grep "\[gone\]" | cut -d " " -f 3) ; do git branch -v -D ${b} ; done | |
git branch -d $(git branch --merged | grep -vw $(git rev-parse --abbrev-ref HEAD)) 2>/dev/null | |
git gc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Provide usage | |
usage() { | |
echo "Usage: $0 VM_ID" | |
exit 1 | |
} | |
[[ $# -eq 0 ]] && usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
delete_empty_bridge() { | |
for v in $(virsh list --all | tail -n +3 | head -n -1 | awk '{print $2}') ; do | |
virsh dumpxml ${v} | |
done | grep br${1} && return | |
ip link delete vlan${1} | |
ip link set down br${1} | |
brctl delbr br${1} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import socket | |
import select | |
from time import sleep | |
host = '127.0.0.1' | |
port = 5555 | |
timeout = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew update | |
brew upgrade | |
brew cleanup | |
brew cask upgrade | |
brew doctor |
NewerOlder