Skip to content

Instantly share code, notes, and snippets.

View kcollasarundell's full-sized avatar
:shipit:
What year is it O.O

Kevin Collas-Arundell kcollasarundell

:shipit:
What year is it O.O
View GitHub Profile
@kcollasarundell
kcollasarundell / partedmagics
Last active May 28, 2021 10:24
Part all the disks.
#!/bin/bash
#this echoes EVERYTHING
set -x verbose
echo "THIS SCRIPT IS DANGEROUS do not be stupid"
apt-get install lvm2 mdadm
# $disks should be replaced with the last char on each disk you want to apply this to
#disks="a b c d e f"
disks="a b c d e f g h i" #EDIT THIS LINE
@kcollasarundell
kcollasarundell / .gitconfig
Last active December 12, 2015 09:29
Git configuration. The gitlocal file is created so that you can differentiate between work and personal while still running the same .gitconfig everywhere
[include]
path = .gitlocal
[alias]
lol = log --graph --decorate --pretty --oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
hlog = log --pretty=format:'The author of %h was %an, %ar%nThe title was >>%s<<%n'
unstage = reset HEAD --
tree = log --graph --oneline --pretty=oneline --all
treeall = log --oneline --decorate --all --decorate --graph
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
@kcollasarundell
kcollasarundell / syncscript
Created March 19, 2013 04:48
Shitty LocalCommand wrapper
#!/bin/bash
SYNCFILES=( ~/bin ~/.vim ~/.vimrc ~/.bashrc ~/.profile )
VER=4
DIR="$HOME/.tmp"
if [ ! -d $DIR ]
then
mkdir $DIR
fi
if [ -a $DIR/$1 ]
dig +trace netregistry.com.au 12:15 PM
; <<>> DiG 9.8.1-P1 <<>> +trace netregistry.com.au
;; global options: +cmd
. 513673 IN NS a.root-servers.net.
. 513673 IN NS b.root-servers.net.
. 513673 IN NS c.root-servers.net.
. 513673 IN NS d.root-servers.net.
. 513673 IN NS e.root-servers.net.
. 513673 IN NS f.root-servers.net.
@kcollasarundell
kcollasarundell / apt.pp
Last active December 19, 2015 06:59
quick and dirty apt ppa thing
exec {'apt-update':
command => 'apt-get update',
refreshonly => true;
}
@kcollasarundell
kcollasarundell / conf.yml
Created July 3, 2013 08:09
ansible for squid
this
@kcollasarundell
kcollasarundell / pre-commit
Last active December 19, 2015 08:18
stop commits: a simple pre-commit hook to prevent commits to the central production repo
#!/bin/bash
USER=`whoami`
DATE=`date --iso-8601=minute`
REPONAME=
PREFIX="$REPONAME_files_attempt"
PATCHFILE="${PREFIX}-${DATE}.patch"
REPODIR="/opt/$REPONAME"
MAINREPO="SOURCEGOESHERE"
@kcollasarundell
kcollasarundell / .gitconfig
Last active December 24, 2015 01:19
versioncontrol your gitconfig but the gitlocal should be a host\env specific allowing you to differentiate between work commits and personal without losing the gitconfigalso get the following:Gitgutter for vim and sublimegit-up gem
[include]
path = .gitlocal
[alias]
lol = log --graph --decorate --pretty --oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
hlog = log --pretty=format:'The author of %h was %an, %ar%nThe title was >>%s<<%n'
unstage = reset HEAD --
tree = log --graph --oneline --pretty=oneline --all
treeall = log --oneline --decorate --all --decorate --graph
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
@kcollasarundell
kcollasarundell / moop
Last active December 25, 2015 13:49
explaination of ; vs , in puppet for 3JTAAG918
So 3JT asked about the use of ; in https://forge.puppetlabs.com/nodes/php/0.6.1
it all comes down to making multiple resource declarations in a single block vs multiple blocks
With multiple declarations ; indicates the end of a resource
This
class {
'php::cli':
ensure => $php_version;
'php::apache':
@kcollasarundell
kcollasarundell / killing-floor.conf
Last active January 1, 2016 03:59
quick rewrite of a kiling floor init script to upstart
description "Starting a quick and dirty killingfloor server with upstart"
#put this file into /etc/init/
#Start the service when the host has network and filesystems
start on (local-filesystems and net-device-up and runlevel [2345])
stop on runlevel [016]
#the magic restart
respawn