Skip to content

Instantly share code, notes, and snippets.

[2018-05-16T13:32:10+01:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /home/mal/code/mal/local
One version per cookbook
[2018-05-16T13:32:10+01:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /home/mal/code/mal/local
One version per cookbook
[2018-05-16T13:32:10+01:00] DEBUG: Running Ohai with the following configuration: {:logger=>Chef::Log}
[2018-05-16T13:32:10+01:00] DEBUG: Running Ohai with the following configuration: {:logger=>Chef::Log}
Starting Chef Client, version 14.1.1
[2018-05-16T13:32:10+01:00] INFO: *** Chef 14.1.1 ***
SERVER=localhost:9200
REQUEST() {
curl -sS -X$1 "http://$SERVER$2" -d "$3"
echo
}
GET() {
REQUEST GET "$1"
}
@mal
mal / elasticsearch-issue-6827.sh
Last active August 29, 2015 14:03
elasticsearch-issue-6827
SERVER=localhost:9200
REQUEST() {
curl -sS -X$1 "http://$SERVER$2" -d "$3"
echo
}
GET() {
REQUEST GET "$1"
}
@mal
mal / gist:7843837
Created December 7, 2013 15:25
chef-lxc stacktrace
[2013-12-07T15:21:51+00:00] INFO: service[lxc-net] restarted
[2013-12-07T15:21:51+00:00] DEBUG: Re-raising exception: TypeError - ruby_block[LXC Clone: my_container -> my_container_clone] (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/lxc/providers/default.rb line 38) had an error: TypeError: Unknown process result type received: FalseClass
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/helpers/base.rb:23:in `initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/helpers/base.rb:68:in `new'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/helpers/base.rb:68:in `run_command'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/helpers/base.rb:139:in `command'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/clone.rb:83:in `copy_original'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/elecksee-1.0.16/lib/elecksee/clone.rb:42:in `clone!'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/lxc/pr
@mal
mal / css3-ordinals.css
Created February 12, 2012 18:36
CSS3 Ordinalisation
/* CSS3 Ordinalisation */
*[data-ord]:after {
content: 'th';
}
*[data-ord$="1"]:not([data-ord$="11"]):after {
content: 'st';
}
*[data-ord$="2"]:not([data-ord$="12"]):after {
content: 'nd';
@mal
mal / convore-bookmarklets.js
Created February 13, 2011 14:44
Convore Usability Bookmarklets
// For use with convore.com
/*
* Automatically increase the size of the input field as you type
*/
javascript:void !function(a,b){var c=function(c){var d=$(this),e=parseInt(d.css("height")),f=c.keyCode===b||c.keyCode===13?19:this.scrollHeight,g;if(g=e-f)$("#message-list").css("margin-bottom",61+f),d.css("height",f),(g<0||a.scrollY<a.scrollMaxY)&&a.scroll(0,a.scrollY-g)};$("#footer").attr("style","height: auto !important"),$("#id-message").bind("keypress keyup",c).css("height",19),$("#post-message").find("input.btn").bind("click keyup",function(a){c.call($("#id-message"),a)})}(window)
/*
* Add permalinks to posts (click the time ago text)
* Based on previous work by balpha, https://convore.com/users/balpha/