Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it:
@alteist
alteist / everpad_to_zim.sh
Last active March 30, 2016 12:06
This script exports everpad's Evernote client (https://github.com/nvbn/everpad/) database (Schema v5) to zim wiki file sctructure: Evernote/notebook/note -> zim/notebook/note.txt + notebook/note/attachments.ext
#!/bin/bash
### everpad_to_zim.sh v0.1
### Copyleft 2013 by [email protected]
###
### This script exports everpad's Evernote client (https://github.com/nvbn/everpad/)
### database (Schema v5) to zim wiki file sctructure:
### Evernote/notebook/note -> zim/notebook/note.txt + notebook/note/attachments.ext
###
### THIS SCRIPT DOES NOT:
### * copy attachments in the right place, but in the end of the note instead.
@smoser
smoser / ubuntu-cloud-virtualbox.sh
Last active July 5, 2024 09:33
example of using Ubuntu cloud images with virtualbox
## Install necessary packages
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
$ sudo modprobe -r kvm_amd kvm_intel
$ sudo service virtualbox stop
$ sudo service virtualbox start
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"