For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| #!/usr/bin/env python | |
| '''Using Webhook and self-signed certificate''' | |
| # This file is an annotated example of a webhook based bot for | |
| # telegram. It does not do anything useful, other than provide a quick | |
| # template for whipping up a testbot. Basically, fill in the CONFIG | |
| # section and run it. | |
| # Dependencies (use pip to install them): | |
| # - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot |
| # post_loc.txt contains the json you want to post | |
| # -p means to POST it | |
| # -H adds an Auth header (could be Basic or Token) | |
| # -T sets the Content-Type | |
| # -c is concurrent clients | |
| # -n is the number of requests to run in the test | |
| ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
| require(RCurl) | |
| require(rjson) | |
| #Starting to hack some routines around the OpenSpending API | |
| #to try to make it a little easier to play with the data using R | |
| #get datasets | |
| #USAGE: | |
| ##datasets.json=okf.os.getDatasetsJSON() | |
| ##gbdatasets.json=okf.os.getDatasetsJSON(territories='gb') |
| update-rc.d logstash-shipper defaults | |
| update-rc.d logstash-reader defaults |