Skip to content

Instantly share code, notes, and snippets.

<!-- send to the user's JID -->
<iq type="get" to=1_1@chat.hipchat.com" id="123">
<query xmlns="http://hipchat.com/protocol/history" maxstanzas="50" type="chat" />
</iq>
<!-- results come back as normal <message> stanzas like they do when joining a room.
the iq response may come back before the messages do. its just a confirmation that we got the request. -->
@powdahound
powdahound / duplicate-hipchat.sh
Created July 16, 2014 19:45
Create a copy of the HipChat OS X app. Download the script and run it, or paste lines 2 and 3 into your terminal
#!/bin/bash
cp -r /Applications/HipChat.app/ /Applications/HipChatTwo.app/
/usr/libexec/PlistBuddy -c "Set CFBundleIdentifier com.hipchat.HipChatTwo" /Applications/HipChatTwo.app/Contents/Info.plist
# Note that when you install an update to the HipChatTwo app it will overwrite the Info.plist
# file and you'll need to run the second command above once again, or run this script.
$(function() {
$("input:visible:enabled[value='']").not(".nofocus").slice(0, 1).focus();
});
function focusFirstInput() {
var inputElements = document.getElementsByTagName('input');
try {
for (var i = 0; i < inputElements.length; i++) {
var e = inputElements[i];
// uses jQuery for hasClass()
if (e.tagName == 'INPUT' &&
!$(e).hasClass('nofocus') &&
(e.type == "text" || e.type == "password") &&
e.value === '') {
function! RunShebang()
if (match(getline(1), '^\#!') == 0)
:!./%
else
echo "No shebang in this file."
endif
endfunction
map <F5> :call RunShebang()<CR>
chefserver:~/chef-repo(master) chef-client
INFO: Starting Chef Run
/usr/lib/ruby/1.8/net/http.rb:2097:in `error!': 400 "Bad Request" (Net::HTTPServerException)
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:in `run_request'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:230:in `run_request'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:95:in `post_rest'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:227:in `authenticate'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:74:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:164:in `run_application'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:162:in `loop'
ase node[:platform]
when "debian", "ubuntu"
%w{automake autoconf libtool subversion-tools help2man build-essential erlang libicu38 libicu-dev libreadline5-dev checkinstall libmozjs-dev wget libcurl4-gnutls-dev}.each {|pkg| package(pkg) }
end
execute "download_couchdb" do
user "root"
cwd "/tmp"
command "wget http://mirror.public-internet.co.uk/ftp/apache/couchdb/0.9.1/apache-couchdb-0.9.1.tar.gz"
creates "/tmp/apache-couchdb-0.9.1.tar.gz"
mayo:~ sudo virsh dumpxml chefserver
Connecting to uri: qemu:///system
<domain type='kvm' id='20'>
<name>chefserver</name>
<uuid>e13f3fac-1a96-253c-2e46-4597ce2c9e44</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
@powdahound
powdahound / current
Created July 30, 2009 16:11
chef-client daemon error
2009-07-30_15:25:30.42602 INFO: Starting Chef Run
2009-07-30_15:25:30.42602 ERROR: Net::HTTPServerException
2009-07-30_15:25:30.42602 FATAL: 400 "Bad Request"
2009-07-30_15:25:30.42603 /usr/lib/ruby/1.8/net/http.rb:2097:in `error!'
2009-07-30_15:25:30.42603 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:in `run_request'
2009-07-30_15:25:30.42603 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:230:in `run_request'
2009-07-30_15:25:30.42604 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:95:in `post_rest'
2009-07-30_15:25:30.42604 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:227:in `authenticate'
2009-07-30_15:25:30.42605 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:74:in `run'
2009-07-30_15:25:30.42605 /usr/lib/ruby/gems/1.8/gems/chef-0.7.4/lib/chef/application/client.rb:164:in `run_application'
ase node[:platform]
when "debian", "ubuntu"
%w{automake autoconf libtool subversion-tools help2man build-essential erlang libicu38 libicu-dev libreadline5-dev checkinstall libmozjs-dev wget libcurl4-gnutls-dev}.each {|pkg| package(pkg) }
end
execute "download_couchdb" do
user "root"
cwd "/tmp"
command "wget http://mirror.public-internet.co.uk/ftp/apache/couchdb/0.9.1/apache-couchdb-0.9.1.tar.gz"
creates "/tmp/apache-couchdb-0.9.1.tar.gz"