- USP: Implementing signal handlers - some caveats
- GServer in Ruby 2.0.0
- "self-pipe trick" - GServer in Ruby 2.0.0
- Bug #7917: Can't write to a Logger in a signal handler - ruby-trunk - Ruby Issue Tracking System
- Tweet by @xpaulbettsx
- cod - Unix: Things to be aware of - Tricks
- The self-pipe trick (djb)
- Safe UNIX Signal Handling Tips
- Avoiding races with Unix signals and select()
- signal(7) - Async-signal-safe functions
This file contains hidden or 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
## | |
# binding definition API. | |
# Examples taken from nagios cookbook | |
bind(:nagios_service_name).to("nagios") | |
bind(:hostgroups) do | |
search(:role, "*:*").map {|r| r.name } | |
end |
This file contains hidden or 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
function _git_branch_name | |
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
end | |
function _is_git_dirty | |
echo (git status -s --ignore-submodules=dirty ^/dev/null) | |
end | |
function _rb_prompt | |
echo (rbenv version | awk '{print $1}') |
This file contains hidden or 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
# Import Jenkins log files | |
$ModLoad imfile # Load the imfile input module | |
$ModLoad imklog # for reading kernel log messages | |
$ModLoad imuxsock # for reading local syslog messages | |
# Cleanup logs | |
#$InputFileName "/opt/jenkins/Workspace clean-up.log" | |
#$InputFileTag jenkins-cleanup | |
#$InputFileStateFile jenkins-cleanup-state | |
#$InputRunFileMonitor |
This file contains hidden or 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/sh | |
# | |
# You should define BINTRAY_ACCOUNT and BINTRAY_APIKEY here or from the outside | |
# BINTRAY_ACCOUNT is you Bintray account and BINTRAY_APIKEY, API Key generated under your Bintray profile | |
# Redefine following variables to match your own usage | |
RPMS_DIR=RPMS/noarch | |
BINTRAY_ACCOUNT=hgomez | |
BINTRAY_REPO=devops-incubator-rpm |
This will demonstrate how to upload build files from Travis CI to S3.
NOTE: Keys have been changed to protect the innocent.
Create an S3 ACL policy, see s3_policy.json for an example.
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains hidden or 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
<?xml version='1.0'?> | |
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> | |
<service_bundle type='manifest' name='jenkins/node'> | |
<service name='network/jenkins/node' type='service' version='0'> | |
<create_default_instance enabled='true'/> | |
<single_instance/> | |
<dependency name='fs' grouping='require_all' restart_on='none' type='service'> | |
<service_fmri value='svc:/system/filesystem/local'/> | |
</dependency> | |
<dependency name='net' grouping='require_all' restart_on='none' type='service'> |
This file contains hidden or 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
sudo emerge wireshark | |
sudo tshark tcp dst port 80 | |
sudo tshark 'tcp dst port 80' -R'http.request.method == "GET"' | |
sudo tcpdump -i lo -s 1024 -l -A port 82 | |
socat -vs UNIX-LISTEN:/tmp/a.sock,reuseaddr UNIX-CONNECT:/var/run/engineyard/unicorn_cirrus.sock | |
tcpdump -s0 dst host api.mixpanel.com |