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
| # original source: http://code.activestate.com/recipes/483732-asynchronous-port-forwarding/ | |
| import socket | |
| import asyncore | |
| class forwarder(asyncore.dispatcher): | |
| def __init__(self, ip, port, remoteip,remoteport,backlog=5): | |
| asyncore.dispatcher.__init__(self) | |
| self.remoteip=remoteip | |
| self.remoteport=remoteport |
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
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/modifying-a-force-directed-graph |
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 | |
| # | |
| # script formats bonnie output and calls gnuplot to create a png graph | |
| # of various bonnie parameters. | |
| # | |
| # feed script bonnie++ output - it will attempt to find the last line of bonnie output | |
| # which is all it really cares about anyway | |
| # | |
| # eg: Using uid:65534, gid:65534. | |
| # Writing a byte at a time...done |
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
| var http = require('http'), | |
| fileSystem = require('fs'), | |
| path = require('path') | |
| util = require('util'); | |
| http.createServer(function(request, response) { | |
| var filePath = 'path_to_file.mp3'; | |
| var stat = fileSystem.statSync(filePath); | |
| response.writeHead(200, { |
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
| # Source accepts http/https or the protocol region:// with the host as the bucket | |
| # access_key_id and secret_access_key are just that | |
| # Note resource name has changed from s3_file to s3_aware_remote_file | |
| # for the eu-west-1 region: | |
| s3_aware_remote_file "/var/bulk/the_file.tar.gz" do | |
| source "s3-eu-west-1://your.bucket/the_file.tar.gz" | |
| access_key_id your_key | |
| secret_access_key your_secret | |
| owner "root" |
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 fileinput | |
| import argparse | |
| from operator import itemgetter | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
| parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
| args = parser.parse_args() |
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
| s3cmd sync --exclude '.DS_Store' --exclude '.git/*' --exclude-from '.gitgnore' --add-header=Expires:max-age=604800 --acl-public ./ s3://the_bucket_name |
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
| ewoJInNpZ25hdHVyZSIgPSAiQXBNVUJDODZBbHpOaWtWNVl0clpBTWlKUWJLOEVk | |
| ZVhrNjNrV0JBWHpsQzhkWEd1anE0N1puSVlLb0ZFMW9OL0ZTOGNYbEZmcDlZWHQ5 | |
| aU1CZEwyNTBsUlJtaU5HYnloaXRyeVlWQVFvcmkzMlc5YVIwVDhML2FZVkJkZlcr | |
| T3kvUXlQWkVtb05LeGhudDJXTlNVRG9VaFo4Wis0cFA3MHBlNWtVUWxiZElWaEFB | |
| QURWekNDQTFNd2dnSTdvQU1DQVFJQ0NHVVVrVTNaV0FTMU1BMEdDU3FHU0liM0RR | |
| RUJCUVVBTUg4eEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUtEQXBCY0hCc1pT | |
| QkpibU11TVNZd0pBWURWUVFMREIxQmNIQnNaU0JEWlhKMGFXWnBZMkYwYVc5dUlF | |
| RjFkR2h2Y21sMGVURXpNREVHQTFVRUF3d3FRWEJ3YkdVZ2FWUjFibVZ6SUZOMGIz | |
| SmxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1CNFhEVEE1TURZeE5U | |
| SXlNRFUxTmxvWERURTBNRFl4TkRJeU1EVTFObG93WkRFak1DRUdBMVVFQXd3YVVI |
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
| # It's important to convert the vbox image (VMDK or VDI or whatever) using | |
| # the same version of VirtualBox that created it. You can try converting the image | |
| # with qemu-img or kvm-img, but weird version mismatches will possibly make it not | |
| # work. | |
| # On your VirtualBox machine: | |
| cd $VBOX_ROOT/$MACHINE_ROOT/ | |
| VBoxManage clonehd machine.vmdk machine.img --format RAW | |
| scp machine.img root@kvm-host:/somewhere |
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
| This playbook has been removed as it is now very outdated. |
OlderNewer