- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
sudo aptitude -y install nginx | |
cd /etc/nginx/sites-available | |
sudo rm default | |
sudo cat > jenkins | |
upstream app_server { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Plack::Request; | |
use HTTP::Status qw(:constants status_message); | |
use JSON qw(from_json); | |
use LWP::UserAgent; | |
sub to_psgi_res { |
diff --git a/urllib.py b/urllib.py | |
index 802d9b7..d13ddb7 100644 | |
--- a/urllib.py | |
+++ b/urllib.py | |
@@ -35,7 +35,7 @@ __all__ = ["urlopen", "URLopener", "FancyURLopener", "urlretrieve", | |
"localhost", "thishost", "ftperrors", "basejoin", "unwrap", | |
"splittype", "splithost", "splituser", "splitpasswd", "splitport", | |
"splitnport", "splitquery", "splitattr", "splitvalue", | |
- "splitgophertype", "getproxies"] | |
+ "splitgophertype", "getproxies", "getnoproxies"] |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.github.mxcl.homebrew.daemontools</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/svscanboot</string> | |
</array> |
head /service/jenkins/env/* | |
==> /service/jenkins/env/HOME <== | |
/home/jenkins/ | |
==> /service/jenkins/env/JENKINS_HOME <== | |
/home/jenkins/ | |
==> /service/jenkins/env/USER <== | |
jenkins |
def table_at(selector) | |
Nokogiri::HTML(page.body).css(selector).map do |table| | |
table.css('tr').map do |tr| | |
tr.css('td').map { |td| td.text } | |
end | |
end[0].reject(&:empty?) | |
end |