This file contains hidden or 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
def populate(file, result): | |
''' | |
Read bzipped syslog and match re below, append to dict referred to | |
by result. | |
Requires re and bz2 | |
''' | |
f = BZ2File(file, 'r') | |
re_aide = re.compile('^\w+ \d+ \d\d:\d\d:\d\d ([\w\-\.]+) aide: (.*)$') |
This file contains hidden or 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
echo 'SHOW SLAVE STATUS\G' | mysql -u root -p$pw mysql | grep 'Master_Log_Pos' \ | |
| awk '/Read/{a=$NF} /Exec/{b=$NF} END{print a-b}' |
This file contains hidden or 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
# Replicate | |
sgdisk -R /dev/sda /dev/sdb | |
# Reandomise GUIDs | |
sgdisk -G /dev/sdb |
This file contains hidden or 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
install | |
lang en_GB.UTF-8 | |
keyboard us-acentos | |
network --device eth0 --bootproto dhcp | |
rootpw --iscrypted $6$n4QrpXe8$RkhuWPAuEIcng90FFRZrrXPi.Dd/W6tdy71TZ6gqMEXPyX4k9EdlZGlt7tiJVyF.ENPILHOroOOPD6F0wof1C1 | |
firewall --enabled --port=22:tcp | |
authconfig --enableshadow --enablemd5 | |
selinux --disabled | |
timezone --utc UTC | |
bootloader --location=mbr --driveorder=hda |
This file contains hidden or 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
find . -name \*.wav | while read line ; do bn=$(basename "$line") ; mp3=${bn%.*}.mp3 ; if [[ ! -f mp3/$mp3 ]] ; then echo $line ; fi ; done |
This file contains hidden or 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 update-alternatives --install /usr/bin/scala scala "/opt/scala/latest/bin/scala" 1 | |
sudo update-alternatives --install /usr/bin/scalac scalac "/opt/scala/latest/bin/scalac" 1 | |
sudo update-alternatives --install /usr/bin/fsc fsc "/opt/scala/latest/bin/fsc" 1 | |
sudo update-alternatives --install /usr/bin/sbaz sbaz "/opt/scala/latest/bin/sbaz" 1 | |
sudo update-alternatives --install /usr/bin/sbaz-setup sbaz-setup "/opt/scala/latest/bin/sbaz-setup" 1 | |
sudo update-alternatives --install /usr/bin/scalap scalap "/opt/scala/latest/bin/scalap" 1 | |
sudo update-alternatives --install /usr/bin/scaladoc scaladoc "/opt/scala/latest/bin/scaladoc" 1 |
This file contains hidden or 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/sh | |
cd || exit 1 # Go home! | |
cat <<EOS >.rpmmacros | |
%_topdir %(echo $HOME)/rpmbuild | |
EOS | |
mkdir -p rpmbuild/{BUILD{,ROOT},{,S}RPMS,SOURCES,SPECS} |
This file contains hidden or 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
Summary: Fast and lean authoritative DNS Name Server | |
Name: nsd | |
Version: 4.1.1 | |
Release: 1 | |
License: BSD | |
Url: http://www.nlnetlabs.nl/%{name}/ | |
Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz | |
Source1: nsd.init | |
Source2: nsd.cron | |
Source3: nsd.sysconfig |
This file contains hidden or 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
set ai sw=4 ts=4 sts=4 et bg=dark nu ml | |
set pastetoggle=<F2> | |
" Tabs!! | |
map <F8> :tabn<CR> | |
map <F7> :tabp<CR> | |
map <F6> :tabe | |
" Open the file you are cursor is currently over |
This file contains hidden or 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 | |
# Script to make (or update) a yum repo | |
workers=4 | |
REPOS=() | |
# To add a repo, REPOS+=("name or description|directory") | |
REPOS+=("Centos 7 x86_64 - live|/var/repo/repo/live/7/x86_64/") | |
REPOS+=("Centos 6 x86_64 - live|/var/repo/repo/live/6/x86_64/") | |
#REPOS+=("Centos 5 x86_64 - live|/var/repo/repo/live/5/x86_64/") |
OlderNewer