This collection of helper scripts are used to generate .mp4 files containing the output from [gource][1], a visualisation tool that generates pretty output from the git log output.
- gource
- ffmpeg with x264 support
| # ------------------------------------------------------------------ | |
| # Desigining "trending topics in 24 hours sliding window" with Redis | |
| # ------------------------------------------------------------------ | |
| redis-cli del tophashes:2010-12-07-08-00 | |
| redis-cli del tophashes:2010-12-07-09-00 | |
| redis-cli del tophashes:current | |
| echo '=== 8:00 AM ===' |
| <!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ --> | |
| <!doctype html> | |
| <html lang=en> | |
| <head> | |
| <meta charset=utf-8> | |
| <title>blah</title> | |
| </head> | |
| <body> | |
| <p>I'm the content</p> |
| """Make PyYAML output an OrderedDict. | |
| It will do so fine if you use yaml.dump(), but that generates ugly, | |
| non-standard YAML code. | |
| To use yaml.safe_dump(), you need the following. | |
| """ | |
| def represent_odict(dump, tag, mapping, flow_style=None): | |
| """Like BaseRepresenter.represent_mapping, but does not issue the sort(). |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #The MIT License (MIT) | |
| # | |
| #Copyright (c) 2015 Andre Queiroz | |
| # | |
| #Permission is hereby granted, free of charge, to any person obtaining a copy | |
| #of this software and associated documentation files (the "Software"), to deal | |
| #in the Software without restriction, including without limitation the rights | |
| #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| #copies of the Software, and to permit persons to whom the Software is | |
| #furnished to do so, subject to the following conditions: |
| # 1.install gource using HomeBrew | |
| $ brew install gource | |
| # 2.install avconv | |
| git clone git://git.libav.org/libav.git | |
| cd libav | |
| # it will take 3-5 minutes to complie, be patient. | |
| ./configure --disable-yasm | |
| make && make install |
| #!/bin/bash | |
| # How to install Graphite as a user on CentOS 5.5 (with neither internet access and root account) | |
| # -------------------------------------------------------------------------------- | |
| # Tomasz Kalkosiński - refaktor.blogspot.com | |
| # | |
| # Graphite is a Scalable Realtime Graphing (http://graphite.wikidot.com/) | |
| # This script is based on two excellent tutorials: | |
| # http://community.webfaction.com/questions/10038/how-to-install-pycairo-in-python27-thanks |
| #!/bin/bash | |
| # This script is used by Nagios to post alerts into a Slack channel | |
| # using the Incoming WebHooks integration. Create the channel, botname | |
| # and integration first and then add this notification script in your | |
| # Nagios configuration. | |
| # | |
| # All variables that start with NAGIOS_ are provided by Nagios as | |
| # environment variables when an notification is generated. | |
| # A list of the env variables is available here: |