In your command-line run the following commands:
brew doctorbrew update
| # Load Json into a Python object | |
| import urllib2 | |
| import json | |
| req = urllib2.Request("http://localhost:81/sensors/temperature.json") | |
| opener = urllib2.build_opener() | |
| f = opener.open(req) | |
| json = json.loads(f.read()) | |
| print json | |
| print json['unit'] |
In your command-line run the following commands:
brew doctorbrew update| #!/usr/bin/python | |
| # Modified by Travis Lee | |
| # Last Updated: 4/21/14 | |
| # Version 1.16 | |
| # | |
| # -changed output to display text only instead of hexdump and made it easier to read | |
| # -added option to specify number of times to connect to server (to get more data) | |
| # -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc... | |
| # -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port) |
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)| -A INPUT -i eth0 -p udp -m udp --dport 5060 -j SIP | |
| # | |
| -A SIP -i eth0 -p udp -m udp --dport 5060 -m string --string "INVITE" --algo bm --from 23 --to 28 -m comment --comment "Catch SIP INVITEs" -j SIPINVITE | |
| -A SIP -i eth0 -p udp -m udp --dport 5060 -m string --string "REGISTER" --algo bm --from 23 --to 30 -m comment --comment "Catch SIP REGISTERs" -j SIPREGISTER | |
| -A SIP -m comment --comment "Catch and accept everything else" -j ACCEPT | |
| # | |
| -A SIPINVITE -m hashlimit --hashlimit-upto 4/min --hashlimit-burst 4 --hashlimit-mode srcip,dstip,dstport --hashlimit-name anon-sip-rateinv --hashlimit-srcmask 24 -m comment --comment "Rate limit SIP invites" -j ACCEPT | |
| -A SIPINVITE -m limit --limit 10/min -j LOG --log-prefix "SIPINV DROP: " | |
| -A SIPINVITE -m comment --comment "Rate limit exceeded, reject" -j REJECT | |
| # |
| <?php | |
| /* | |
| * Bitstorm - A small and fast Bittorrent tracker | |
| * Copyright 2008 Peter Caprioli | |
| * | |
| * 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, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * |
| import java.util.*; | |
| import java.io.*; | |
| import java.security.*; | |
| public class ChangePassword | |
| { | |
| private final static JKS j = new JKS(); | |
| public static void main(String[] args) throws Exception | |
| { |
| #!/bin/bash | |
| # As the "bufferbloat" folks have recently re-discovered and/or more widely | |
| # publicized, congestion avoidance algorithms (such as those found in TCP) do | |
| # a great job of allowing network endpoints to negotiate transfer rates that | |
| # maximize a link's bandwidth usage without unduly penalizing any particular | |
| # stream. This allows bulk transfer streams to use the maximum available | |
| # bandwidth without affecting the latency of non-bulk (e.g. interactive) | |
| # streams. |