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
| #!/usr/bin/env python | |
| import sys | |
| # default dns query timeout is 5 seconds | |
| retrans = 5 | |
| # give the user a chance to override it by passing an argument | |
| if (len(sys.argv) == 2): | |
| retrans = int(sys.argv[1]) | |
| # 3 dummy IP addresses | |
| nameservers = ["1.1.1.1", "2.2.2.2", "3.3.3.3"] |
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
| search for PL2303HX and download an OSX driver | |
| (http://www.prolific.com.tw/us/showproduct.aspx?p_id=229&pcid=41) | |
| then | |
| screen /dev/cu.PL2303-00001004 115200 |
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/bash | |
| make-kpkg clean | |
| timestamp=`date +"%Y%m%d"` | |
| time sudo fakeroot make-kpkg \ | |
| --revision $timestamp \ | |
| --initrd --jobs 8 \ | |
| kernel_image kernel_headers |
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
| <VirtualHost *:80> | |
| ServerName graphite | |
| DocumentRoot "/usr/local/share/graphite-web/content/" | |
| # I've found that an equal number of processes & threads tends | |
| # to show the best performance for Graphite (ymmv). | |
| WSGIDaemonProcess graphite processes=5 threads=5 inactivity-timeout=120 display-name=graphite | |
| WSGIProcessGroup graphite | |
| WSGIApplicationGroup graphite | |
| WSGIImportScript /usr/local/etc/graphite/graphite.wsgi process-group=graphite application-group=graphite |
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
| /* | |
| * IP checksumming functions. | |
| * (c) 2008 Gerd Hoffmann <kraxel@redhat.com> | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; under version 2 of the License. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
| # pushover notification script for mikrotik routers | |
| # scp it to the router and then run: | |
| # | |
| # /file/remove pushover.rsc | |
| # /system script remove pushover | |
| # /system/script/add name=pushover source=[/file get pushover.rsc contents] | |
| # | |
| # enable it to run at startup with this command | |
| # /system/scheduler/add name=pushover on-event=pushover start-time=startup interval=0 | |
| # |
OlderNewer