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
sudo yum -y install python-virtualenv | |
virtualenv my-venv | |
source my-venv/bin/activate | |
git clone url-for-bloom | |
cd bloom | |
python setup.py develop | |
./bin/bloom-generate |
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 python | |
""" Given a username, add the julython hook to all of your repos. | |
Its kind of a pain... this script needs your username, your password, *and* an oauth token. | |
To generate an oauth token, do the following: | |
- Navigate to github.com. | |
- Click on the "account settings" icon in the top right. | |
- Click on the "Applications" menu on the left. | |
- Click on "Create new token" next to "Personal API Access Tokens" |
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 python | |
# -*- coding: utf-8 -*- | |
# (c) 2013, Ralph Bean <[email protected]> | |
# LGPLv2+ | |
# | |
# You can pass this action an arbitrary number of kw arguments which will be | |
# used to make up the main message body (json). | |
# | |
# Dedicated to Seth Vidal. This was his idea. |
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
import fedmsg | |
import fedmsg.config | |
import fedmsg.crypto | |
import M2Crypto.X509 | |
config = fedmsg.config.load_config() | |
import logging | |
logging.basicConfig() |
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
<?php | |
// globals | |
$config = 0; | |
$queue = 0; | |
// A utility function, taken from the comments at | |
// http://php.net/manual/en/language.types.boolean.php | |
function to_bool ($_val) { | |
$_trueValues = array('yes', 'y', 'true'); |
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
File "/usr/bin/fedmsg-hub", line 9, in <module> | |
load_entry_point('fedmsg==0.6.8', 'console_scripts', 'fedmsg-hub')() | |
File "/usr/lib/python2.6/site-packages/fedmsg/commands/hub.py", line 71, in hub | |
command.execute() | |
File "/usr/lib/python2.6/site-packages/fedmsg/commands/__init__.py", line 93, in execute | |
return self._daemonize() | |
File "/usr/lib/python2.6/site-packages/fedmsg/commands/__init__.py", line 89, in _daemonize | |
return self.run() | |
File "/usr/lib/python2.6/site-packages/fedmsg/commands/hub.py", line 66, in run | |
main(options=self.config) |
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
# Throw this in /etc/fedmsg.d/ | |
config = dict( | |
endpoints = dict( | |
bodhi=[ | |
"tcp://localhost:3000", | |
# Add more of these on more ports if running multiple wsgi procs | |
] | |
) | |
) |
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 python | |
""" Print all of the clone-urls for a GitHub organization. | |
It requires the pygithub3 module, which you can install like this:: | |
$ sudo yum -y install python-virtualenv | |
$ mkdir scratch | |
$ cd scratch | |
$ virtualenv my-virtualenv |
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 python | |
# A script to count the number of current and maximum fedmsg zeromq connections | |
# Author: Luke Macken <[email protected]> | |
# License: GPLv3 | |
import os | |
import requests | |
from BeautifulSoup import BeautifulSoup | |
cur_sessions = 0 |
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 python | |
""" NRPE check for datanommer/fedmsg health. | |
Given a category like 'bodhi', 'buildsys', or 'git', return an error if | |
datanommer hasn't seen a message of that type in such and such time. | |
Requires: python-dateutil | |
Usage: | |
$ check_datanommer_timesince CATEGORY WARNING_THRESH CRITICAL_THRESH |