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 / apt.pp
Last active December 19, 2015 06:59
quick and dirty apt ppa thing
exec {'apt-update':
command => 'apt-get update',
refreshonly => true;
}
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 / 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 ]
@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 / 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
package Assign1;
public class PizzaOrder {
//declaring variables
private int id;
private String name;
private String phoneNumber;
private String order;
private String type;
@kcollasarundell
kcollasarundell / yaml.vim
Created March 12, 2012 16:46
Dumb-smart indentation for Yaml (mirror)
" Vim indent file
" Language: Yaml
" Author: Ian Young
if exists("b:did_indent")
finish
endif
"runtime! indent/ruby.vim
"unlet! b:did_indent
let b:did_indent = 1
@kcollasarundell
kcollasarundell / gist:2023268
Created March 12, 2012 16:46
Vim indenting and regex
"Brute force an ignorance time
if line =~ '^\s*#'
return indent
elseif line =~ ':\s*$'
return increase
elseif line =~ ':\s*#.*$'
return increase
else
return indent
endif
#!/bin/ruby
# require Class[drbd::drbd_install]
# require Class[drbd::drbd_service]
# $drbd_resource = ymllookup('drbd_resource')
drbd_resource = { "data_share1" => { 'node1.local' => ['192.168.222.21','/dev/drbd1'],
'node2.local' => ['192.168.222.22','/dev/drbd1'] },
"data_share2" => { 'node1.local' => ['192.168.222.21','/dev/drbd2'],
'node2.local' => ['192.168.222.22','/dev/drbd2'] }}
class drbd::drbd_config {
# require Class[drbd::drbd_install]
# require Class[drbd::drbd_service]
# $drbd_resource = ymllookup('drbd_resource')
$drbd_resource = { data_share1 => { 'node1.local' => ['192.168.222.21','/dev/drbd1'],
'node2.local' => ['192.168.222.22','/dev/drbd1'] },
data_share2 => { 'node1.local' => ['192.168.222.21','/dev/drbd2'],
'node2.local' => ['192.168.222.22','/dev/drbd2'] }