Skip to content

Instantly share code, notes, and snippets.

View aspiers's full-sized avatar

Adam Spiers aspiers

View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
use Getopt::Long;
sub usage {
warn @_, "\n" if @_;
'(erc-generate-log-file-name-function (quote erc-generate-log-file-name-network))
'(erc-log-channels-directory "~/.erc/log")
'(erc-log-insert-log-on-open t)
'(erc-log-mode t)
'(erc-log-write-after-insert t)
'(erc-log-write-after-send t)
'(erc-modules (quote (autojoin button completion fill irccontrols log match menu netsplit noncommands readonly ring stamp track)))
root@coral:~/ > ps -ef | grep mysql
root 23372 22497 0 11:52 pts/0 00:00:00 grep mysql
root@coral:~/ > mysqld_safe --skip-grant-tables --skip-networking &
[1] 23373
root@coral:~/ > 120505 11:52:31 mysqld_safe Logging to syslog.
120505 11:52:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
root@coral:~/ > mysqladmin flush-privileges
root@coral:~/ > mysqladmin password 'foobar'
mysqladmin: connect to server at 'localhost' failed
@aspiers
aspiers / a.rb
Created December 18, 2012 21:29
--- m4/mp3splt.m4.orig 2012-12-18 21:13:05.124139636 +0000
+++ m4/mp3splt.m4 2012-12-18 21:24:37.783700438 +0000
@@ -20,9 +20,9 @@
if test "x$mp3splt_libraries" != "x"; then
MP3SPLT_LIBS="-L$mp3splt_libraries"
elif test "x$mp3splt_prefix" != "x"; then
- MP3SPLT_LIBS="-L$mp3splt_prefix/lib"
+ MP3SPLT_LIBS="-L$mp3splt_prefix/${libdir#$exec_prefix/}"
elif test "x$prefix" != "xNONE"; then
- MP3SPLT_LIBS="-L$prefix/lib"
@aspiers
aspiers / gist:5091419
Created March 5, 2013 16:10
rubygems-bundler not working
$ gem list
*** LOCAL GEMS ***
bundler (1.2.4)
rake (10.0.3)
rubygems-bundler (1.1.1, 1.1.0)
rvm (1.11.3.6)
$ bundle exec gem list | wc -l
98
%% if create_events
%% for repo, events in create_events|groupby("repo.name")
%% for type, elist in events|groupby("payload.ref_type")
%% trans count=elist|length
- created {{ count }} {{ type }} in {{ repo }}: {{ elist|first }}
%% pluralize
- created {{ count }} {{ type }}es in {{ repo }}: {{ elist|first }}
%% endtrans
%% endfor
%% endfor
@aspiers
aspiers / gca.sh
Last active December 17, 2015 09:49
#!/bin/bash
read -p 'Enter event> ' event
google calendar add --user myaccount@gmail.com "${event// @ / at }" 2>&1 | \
awk '{ print "* " $0 }
/^Event created: / {
system("url_handler.sh " substr($0, 16))
}'
[github]
- aspiers/barclamp-provisioner
+ created branch 'release/pebbles/master'
- crowbar/crowbar
+ opened pull request #1798 (show admin IP and network range during sanity check at setup time)
+ created comment on issue #1801 (more install-chef-suse.sh changes for pebbles)
#!/bin/bash
ibs=aspiers@10.11.0.159:/mounts/dist/ibs
# should use http://download.suse.de/update/ not euklid?
# mairix:m:20120803222629.93475e8vgyyav9it@imap.suse.de
updates=aspiers@euklid.suse.de:/mirror/SuSE/zypp-patches.suse.de/x86_64/update
sles_updates=$updates/SLE-SERVER
cloud_updates=$updates/SUSE-CLOUD
dest=/data/install/mirrors
diff --git a/scripts/create-vm.sh b/scripts/create-vm.sh
index fa3dc1b..5d71a5a 100755
--- a/scripts/create-vm.sh
+++ b/scripts/create-vm.sh
@@ -69,7 +69,10 @@ main () {
else
echo "Creating $vm_disk as qcow2 image ..."
qemu-img create -f qcow2 "$vm_disk" 4G
- opts=( --pxe )
+ opts=(