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
#!/bin/bash | |
# Switch HDMI on/off depending on presence of network host | |
if [ -z "$1" ]; then | |
echo "Usage: $0 hostname" | |
exit 1 | |
fi | |
( |
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
#!/bin/bash | |
. /etc/metric.sh | |
( | |
flock -n 200 | |
if [ ! $? -eq 0 ]; then | |
echo Already running | |
exit 1 | |
fi |
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
#include <libmemcached/memcached.hpp> | |
using namespace memcache; | |
int main() { | |
const char *config_string= "--SND-TIMEOUT=1000000 --SERVER=localhost:2034"; | |
memcached_st *memc= memcached(config_string, strlen(config_string)); | |
memcached_free(memc); | |
} |
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
0 0.04593154 Elink.exe IRP_MJ_CREATE VCP0 SUCCESS Options: Open | |
1 0.00000475 Elink.exe IOCTL_SERIAL_GET_PROPERTIES VCP0 SUCCESS | |
2 0.00000335 Elink.exe IOCTL_SERIAL_GET_MODEMSTATUS VCP0 SUCCESS | |
3 0.00000307 Elink.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS | |
4 0.00000279 Elink.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS | |
5 0.00000223 Elink.exe IOCTL_SERIAL_GET_CHARS VCP0 SUCCESS | |
6 0.00000279 Elink.exe IOCTL_SERIAL_GET_HANDFLOW VCP0 SUCCESS | |
7 0.00000279 Elink.exe IOCTL_SERIAL_GET_BAUD_RATE VCP0 SUCCESS | |
8 0.00000251 Elink.exe IOCTL_SERIAL_GET_LINE_CONTROL VCP0 SUCCESS |
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
# Email system contact when PHP is updated | |
execute "php_update_email" do | |
command "echo Contact operations for details | mail -s 'PHP has been updated on #{node[:hostname]}' #{node[:contact]}" | |
action :nothing | |
end | |
# Ensure latest PHP | |
package "php53" do | |
action :upgrade | |
notifies :run, resources(:execute => "php_update_email") |
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
#!/bin/bash | |
# Install | |
# Place in ~/bin | |
# sudo aptitude install xwit xvkbd wmctrl | |
if [ "x$1" == "x" ];then | |
command=" " | |
else | |
command=$1 |
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
nodes = search(:node, "*:*") | |
template "/etc/ssh/ssh_known_hosts" do | |
source "ssh_known_hosts.erb" | |
mode 0644 | |
owner "root" | |
group "root" | |
variables(:nodes => nodes) | |
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
[root@coot yum.repos.d]# chef-client | |
[Thu, 19 Aug 2010 11:07:53 +0100] INFO: Starting Chef Run | |
/usr/lib/ruby/gems/1.8/gems/moneta-0.6.0/lib/moneta/basic_file.rb:53:in `load': marshal data too short (ArgumentError) | |
from /usr/lib/ruby/gems/1.8/gems/moneta-0.6.0/lib/moneta/basic_file.rb:53:in `raw_get' | |
from /usr/lib/ruby/gems/1.8/gems/moneta-0.6.0/lib/moneta/basic_file.rb:41:in `[]' | |
from /usr/lib/ruby/gems/1.8/gems/moneta-0.6.0/lib/moneta/../moneta.rb:69:in `fetch' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/cache/checksum.rb:38:in `lookup_checksum' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/cache/checksum.rb:34:in `checksum_for_file' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/cache/checksum.rb:28:in `checksum_for_file' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/mixin/checksum.rb:27:in `checksum' |