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 ruby | |
require "rubygems" |
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
seph@mia-in-poll-3:~$ sudo -u nobody -s | |
nobody@mia-in-poll-3:~$ env | |
SHELL=/bin/bash | |
TERM=xterm | |
USER=nobody | |
SUDO_USER=seph | |
SUDO_UID=2001 | |
SSH_AUTH_SOCK=/tmp/ssh-YNywjT1156/agent.1156 | |
USERNAME=nobody | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin |
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
# Still trying to get this compiled. I don't think -isystem helps. (boost is in /usr/local/include) same error with g++ as with llvm | |
whittemore:frontend seph$ g++ -DHAVE_CONFIG_H -I. -I../.. -I./../statesync -I./../terminal -I./../network -I./../crypto -I./../protobufs -I./../util -isystem /usr/local/include -pedantic -Wno-long-long -Werror -Wall -Wextra -Weffc++ -fno-default-inline -pipe -D_THREAD_SAFE -isystem /usr/local/Cellar/protobuf/2.4.1/include -g -O2 -MT terminaloverlay.o -MD -MP -MF .deps/terminaloverlay.Tpo -c -o terminaloverlay.o terminaloverlay.cc | |
cc1plus: warnings being treated as errors | |
/usr/local/include/boost/lambda/detail/operators.hpp: In member function ‘Overlay::Validity Overlay::ConditionalOverlayCell::get_validity(const Terminal::Framebuffer&, int, uint64_t, uint64_t) const’: | |
/usr/local/include/boost/lambda/detail/operators.hpp:119: warning: user-defined ‘const boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::logical_action<boost::lambda::and_action>, |
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
export PATH="/Users/seph/homebrew/bin:$PATH" | |
tar xzf /Users/seph/mosh-0.96a.tar.gz | |
cd mosh-0.96a | |
./configure --prefix=/tmp/mosh --with-boost=/Users/seph/homebrew/ | |
make |
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
git whittemore:tmp seph$ git clone https://github.com/andersk/mosh.git | |
Cloning into mosh... | |
remote: Counting objects: 2305, done. | |
remote: Compressing objects: 100% (713/713), done. | |
remote: Total 2305 (delta 1627), reused 2247 (delta 1571) | |
Receiving objects: 100% (2305/2305), 504.41 KiB | 517 KiB/s, done. | |
Resolving deltas: 100% (1627/1627), done. | |
whittemore:tmp seph$ cd mosh/ | |
whittemore:mosh seph$ git checkout macosx | |
Branch macosx set up to track remote branch macosx from origin. |
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 ruby | |
# we're seeing some odd slowdown on hosts. It kind of looks like the | |
# host is pausing for some number of milliseconds, which hits the | |
# various ruby processes. It would be nice if we understood what was | |
# happening. This is a small script to help understand it. | |
# theory: | |
# Do work that takes about N | |
# Measure elapsed time M |
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
def symlink_r(source, dest) | |
# recursively symlinks a directory tree. | |
# skips files that already exist. | |
::Dir.glob(::File.join(source, "**", "*")).each do |f| | |
next if ::File.directory?(f) | |
new_name = ::File.join(dest, f.gsub(/^#{source}/, "") ) | |
next if ::File.exists?(new_name) or ::File.symlink?(new_name) | |
::FileUtils.mkdir_p(::File.dirname(new_name)) | |
#puts "trying #{f} => #{new_name}" | |
::File.symlink(f, new_name) |
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
db.foo.insert( {_id: 1}, { "$set": {param: "one" }} ) | |
db.foo.update( | |
{ | |
"_id": 1, | |
"sub._id": 2 | |
}, | |
{ $set: { "sub.$": { | |
"param": 2, | |
"place": "Boston" |
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
# Create the ssh access key | |
# | |
# Something in the node.set lines happens at the *start* of the chef | |
# run. It might be the node.set, or it might be the File.read, but | |
# either way, it happens before the resource execution. To compensate | |
# for this, we need to shift the ssh key creation to the start of the | |
# run. http://docs.opscode.com/resource_common_compile.html | |
sshfile = "/home/runtime/id_rsa" | |
sshcomment = [ |
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
class Chef::Recipe | |
def find_nrpe_plugin(name) | |
return name if name.start_with?("/") | |
end | |
end |