This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My new git commit shortcut, thanks to http://whatthecommit.com/ :-) | |
alias commit='git commit -m "$(curl -s http://whatthecommit.com/ |grep '<p>' |cut -c 4-)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart script for a play application that binds to an unprivileged user. | |
# put this into a file like /etc/init/playframework | |
# you can then start/stop it using either initctl or start/stop/restart | |
# e.g. | |
# start playframework | |
# http://dominikdorn.com | |
description "Description of your app" | |
author "Dominik Dorn <dominik@studyguru.eu>" | |
version "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.ns('Ext.ux.state'); | |
/** | |
* @class Ext.ux.state.LocalStorageProvider | |
* @extends Ext.state.Provider | |
* A Provider implementation which saves and retrieves state via the HTML5 localStorage object. | |
* If the browser does not support local storage, an exception will be thrown upon instantiating | |
* this class. | |
* <br />Usage: | |
<pre><code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Utility script which googles for the data contained inside positional | |
# arguments or for everything stored inside the WM clipboard. | |
# | |
# If the content of either positional argumets or clipboard starts with | |
# http,ftp,ecc (which means it is already a valid url), then skip the | |
# url-stuffing bit. | |
# | |
# Depends on xclip and xdg-open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template "/tmp/foo.rb" | |
source "foo.rb.erb" | |
cookbook "banana" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = Savon::Client.new do | |
# This can be a URL also | |
wsdl.document = "/Path/to/your.wsdl" | |
# These are optional, only if your WSDL sucks :) | |
wsdl.endpoint = "https://your_endpoint" | |
wsdl.namespace = "http://your_namespace" | |
certs = Akami::WSSE::Certs.new :cert_file => "/path/to/cert.crt", :private_key_file => "/path/to/private/key.pem", :private_key_password => "password" | |
wsse.sign_with = Akami::WSSE::Signature.new certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keystore = "/etc/java-6-sun/security/cacerts" | |
keystore_pass = "foobar" | |
# you'll need foo.cert et. al. in files/default | |
certs = %w{foo bar bang} | |
certs.each do |cert| | |
cookbook_file "#{Chef::Config[:file_cache_path]}/#{cert}.cert" do | |
source "#{cert}.cert" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import cd, env, local, prefix, run, sudo | |
env.hosts = ['cs01.actalis.vpn'] | |
env.project_root = '/home/libersoft/visalaid' | |
env.user = 'libersoft' | |
def push(): | |
local('git push') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In Chef, when a resource is defined all its variables are evaluated during | |
# compile time and the execution of the resource takes place in converge phase. | |
# So if the value of a particular attribute is changed in converge | |
# (and not in compile) the resource will be executed with the old value. | |
# Example problem: | |
# Let's consider this situation where there are two steps involved in a recipe | |
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
# in converge phase | |
# Step 2 is a Chef resource that makes use of the node attribute that was |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
OlderNewer