Skip to content

Instantly share code, notes, and snippets.

View mindjiver's full-sized avatar
🐒
Working from home

Peter Jönsson mindjiver

🐒
Working from home
View GitHub Profile
@mindjiver
mindjiver / scm.py.patch
Created February 17, 2014 10:09
Quick fix to include vcs-information in generated tarball
--- /tmp/scm.py 2014-02-17 11:08:18.730335514 +0100
+++ /usr/lib/python2.6/site-packages/mockbuild/scm.py 2014-02-17 11:07:56.501196444 +0100
@@ -151,9 +151,9 @@
tarball = tardir + ".tar.gz"
taropts = ""
- proc = subprocess.Popen(['tar', '--help'], shell=False, stdout=subprocess.PIPE)
- if "--exclude-vcs" in proc.communicate()[0]:
- taropts = "--exclude-vcs"
postfix 14610 1080 0 18:05 ? 00:00:00 pickup -l -t fifo -u
root 14628 582 0 19:44 ? 00:00:00 sshd: root@pts/0
root 14630 14628 0 19:44 pts/0 00:00:00 -bash
root 14643 14630 0 19:44 pts/0 00:00:00 ps -fA
root 16307 1 0 2013 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 16309 16307 0 2013 ? 00:01:29 nginx: worker process
root 19000 601 0 Feb01 ? 00:00:00 CROND
root 19001 19000 0 Feb01 ? 00:00:00 /bin/bash -c /bin/sleep 150; /usr/bin/chef-client &> /dev/null
root 19014 19001 0 Feb01 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client
root 19019 19014 0 Feb01 ? 00:00:00 chef-client worker: ppid=19014;start=20:02:32;
@mindjiver
mindjiver / packer.log
Created January 12, 2014 23:15
First actually working version!
cloudstack output will be in this color.
==> cloudstack: Reading in SSH private key from local disk
==> cloudstack: Creating virtual machine...
==> cloudstack: Waiting for virtual machine to become active...
==> cloudstack: Waiting for SSH to become available...
==> cloudstack: Connected to SSH!
==> cloudstack: Provisioning with shell script: scripts/motd.sh
==> cloudstack: Provisioning with shell script: scripts/version.sh
==> cloudstack: Stopping Virtual Machine...
cloudstack output will be in this color.
==> cloudstack: Creating temporary ssh key for virtual machine...
==> cloudstack: Creating virtual machine...
==> cloudstack: Waiting for virtual machine to become active...
==> cloudstack: Error waiting for virtual machine to become active: Received HTTP client/server error from CloudStack: 431
==> cloudstack: Destroying virtual machine...
==> cloudstack: Deleting temporary ssh key...
Build 'cloudstack' errored: Error waiting for virtual machine to become active: Received HTTP client/server error from CloudStack: 431
../../mitchellh/packer/builder/cloudstack/api.go:261: invalid operation: response.(ListVirtualMachinesResponse).Listvirtualmachinesresponse[0] (index of type struct { Count float64 "json:\"count\""; Virtualmachine []struct { Account string "json:\"account\""; Cpunumber float64 "json:\"cpunumber\""; Cpuspeed float64 "json:\"cpuspeed\""; Created string "json:\"created\""; Displayname string "json:\"displayname\""; Domain string "json:\"domain\""; Domainid string "json:\"domainid\""; Guestosid string "json:\"guestosid\""; Haenable bool "json:\"haenable\""; Hypervisor string "json:\"hypervisor\""; ID string "json:\"id\""; Keypair string "json:\"keypair\""; Memory float64 "json:\"memory\""; Name string "json:\"name\""; Nic []struct { Gateway string "json:\"gateway\""; ID string "json:\"id\""; Ipaddress string "json:\"ipaddress\""; Isdefault bool "json:\"isdefault\""; Macaddress string "json:\"macaddress\""; Netmask string "json:\"netmask\""; Networkid string "json:\"networkid\""; Traffictype string "json:\"traffic
@mindjiver
mindjiver / facing_error.txt
Created January 8, 2014 15:43
I am facing error
Hi ,
I am facing with this error
fatal:Mixlib::ShellOut::ShellCommandFailed:expected process to exit with [0]
but received 1
Please give me solution ASAP.
Thanks
seema Khalkar
@mindjiver
mindjiver / gist:7457278
Last active August 31, 2018 07:53
CloudStack MAC address scheme
You can operate an external-to-CloudStack DHCP server by filtering the MAC addresses that
CloudStack generates for VMs. CloudStack uses the following logic to assign MAC addresses.
06:<zone-id>:<random>:<random>:<random>:<random>
Configuring your external DHCP server to ignore MAC addresses that begin with 06: should
permit you to allow a non-CloudStack DHCP server. Please note that you'll also need to
exclude your private and public ranges from the IP address range that your external DHCP
server hands out.
@mindjiver
mindjiver / tunnelblick-crash.txt
Created October 24, 2013 21:03
Tunnelblick crashing on fresh Mavericks install.
peter.jonsson ⮀ rodchenko ⮀ ~ ⮀ $ ⮀/Applications/Tunnelblick.app/Contents/MacOS/Tunnelblick Desktop/klarna.tblk/
2013-10-24 22:54:32.706 Tunnelblick[17898:507] Set program update feedURL to https://www.tunnelblick.net/appcast-b.rss
2013-10-24 22:54:32.739 Tunnelblick[17898:507] Received fatal signal Bus error (10). Stack trace: (
0 Tunnelblick 0x000124d7 signal_handler + 284
1 libsystem_platform.dylib 0x9792cdeb _sigtramp + 43
2 ??? 0xffffffff 0x0 + 4294967295
3 Tunnelblick 0x0001b74d -[MenuController applicationDidFinishLaunching:] + 552
4 Foundation 0x98190692 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 49
5 CoreFoundation 0x9ad0e7e4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
6 CoreFoundation 0x9abf03fb _CFXNotificationPost + 3435
@mindjiver
mindjiver / mavericks.patch
Last active December 26, 2015 08:59
Chef Omnibus installer patch for MacOS 10.9
--- install.sh 2013-10-23 22:03:13.000000000 +0200
+++ install.sh 2013-10-23 22:03:30.000000000 +0200
@@ -116,6 +116,7 @@
"10.6") platform_version="10.6" ;;
"10.7") platform_version="10.7" ;;
"10.8") platform_version="10.7" ;;
+ "10.9") platform_version="10.7" ;;
*) echo "No builds for platform: $major_version"
report_bug
exit 1
@mindjiver
mindjiver / gist:6335436
Created August 25, 2013 18:28
(parodi på Runebergs ”Vårt land”)
O Land, o brännvinspannans land!
Ljud högt, du simpla ord.
Ej lyfts en höjd mot himlens rand,
Ej sänks en dal, ej sköljs en strand
Där ej en krog är byggd i nord
På våra fäders jord.
Vårt land är fattigt, skall så bli.
För den, som bröd begär
Vårt välstånd är totalt förbi