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
| # | |
| # A CORS (Cross-Origin Resouce Sharing) config for nginx | |
| # | |
| # == Purpose | |
| # | |
| # This nginx configuration enables CORS requests in the following way: | |
| # - enables CORS just for origins on a whitelist specified by a regular expression | |
| # - CORS preflight request (OPTIONS) are responded immediately | |
| # - Access-Control-Allow-Credentials=true for GET and POST requests |
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 | |
| sudo rsync -aHXh --delete "/.snapshot/`ls -v1 /.snapshot | grep daily | tail -n1`/" "/home/alerticus/mnt/sata/backup/alerticus-thinkpad/root/" | |
| sudo rsync -aHXh --delete "/home/.snapshot/`ls -v1 /home/.snapshot | grep daily | tail -n1`/" "/home/alerticus/mnt/sata/backup/alerticus-thinkpad/home/" |
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
| # Reverse the order of all intervals from /etc/rsnapshot.conf | |
| #interval hourly 3 | |
| #interval daily 7 | |
| #interval weekly 4 | |
| ##interval monthly 3 | |
| # | |
| # all single commands below should be possible to be scripted within a bash loop | |
| # by defining a function called interval and a process afterwards.. | |
| # to get all defined intervals from /etc/rsnapshot you can use grep |
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 SimpleHTTPServer | |
| class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. | |
| This sends the response code and MIME headers. | |
| Return value is either a file object (which has to be copied | |
| to the outputfile by the caller unless the command was HEAD, | |
| and must be closed by the caller under all circumstances), or |
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
| /* Reset | |
| ------------------------------------------------------------ */ | |
| body#ttrssMain, | |
| body#ttrssPrefs, | |
| body#ttrssLogin, | |
| body { | |
| color: #000; | |
| font-family: "Arial", sans-serif; | |
| font-size: 100%; /* Set to default browser size, 16px */ | |
| line-height: 1.5; |
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
| input { | |
| tcp { | |
| type => "apt-history" | |
| port => 3333 | |
| } | |
| } | |
| filter { | |
| # First, glue all lines together into one event! |
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
| [solarized-dark] | |
| background = #002b36 | |
| foreground = #839496 | |
| majorLine = #fdf6e3 | |
| minorLine = #eee8d5 | |
| lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4 | |
| fontName = Sans | |
| fontSize = 10 | |
| fontBold = False | |
| fontItalic = False |
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
| # graphite-web install is hardcoded in setup.cfg to /opt/graphite | |
| sudo mkdir /opt/graphite | |
| sudo chown brad.users /opt/graphite | |
| # run under python2.7 virtualenv | |
| virtualenv --python=python2.7 ~/ve/graphite | |
| source ~/ve/graphite/bin/activate | |
| # install the necessary python packages (simplejson is for flot graphs) | |
| pip install graphite-web carbon whisper django django-tagging uwsgi simplejson |
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
| VERSION="0.9.9" | |
| BUILD="betable1" | |
| set -e -x | |
| # Keep track of the original working directory. | |
| OLDESTPWD="$PWD" | |
| # Work in a temporary directory. | |
| cd "$(mktemp -d)" |
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
| input { | |
| tcp { | |
| type => "syslog" | |
| port => 8514 | |
| } | |
| } | |
| filter { | |
| ## DISCARD IMPROPERLY FORMATTED MESSAGES |