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:
| // This example is adapted from the sample supplied with DynamicObject | |
| // documentation on MSDN: | |
| // | |
| // http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject.aspx | |
| // | |
| // The example has been adapted to be case-sensitive by default and | |
| // test the dynamic object implementation across C#, IronPython 2.6.1 and | |
| // IronRuby 1.0. | |
| // | |
| // The configuration needed to run this example is supplied at the bottom. |
| import bisect | |
| import itertools | |
| import operator | |
| class _BNode(object): | |
| __slots__ = ["tree", "contents", "children"] | |
| def __init__(self, tree, contents=None, children=None): | |
| self.tree = tree |
| /** | |
| * libevent2 sample code | |
| * Catch SIGINT signal | |
| */ | |
| #include <event2/event.h> | |
| #include <stdio.h> | |
| #include <stlib.h> | |
| void sigint_event_function(evutil_socket_t fd, short what, void *arg) | |
| { |
| using System; | |
| using System.Dynamic; | |
| namespace ConsoleApplication1 | |
| { | |
| class Dynamic : DynamicObject | |
| { | |
| public override bool TryGetMember(GetMemberBinder binder, out object result) | |
| { | |
| if (binder.Name == "Name") |
| # How to sign your custom RPM package with GPG key | |
| # Step: 1 | |
| # Generate gpg key pair (public key and private key) | |
| # | |
| # You will be prompted with a series of questions about encryption. | |
| # Simply select the default values presented. You will also be asked | |
| # to create a Real Name, Email Address and Comment (comment optional). | |
| # | |
| # If you get the following response: |
{ "name": "devops01", "id": "20095942", "uuid": "e55a9ac1e7f32b6228b53bea7f305621d6514bde", "public_ip": ['184.106.177.19'], "private_ip": ['10.180.128.208'], "extra": {'flavorId': '4', 'uri': 'https://servers.api.rackspacecloud.com/v1.0/544644/servers/20095942', 'imageId': '49', 'hostId': '4a98d4f222e5d8823fa87aada364b751', 'password': 'devops011aQwJ6M4h', 'metadata': {}}}
{ "name": "devops02", "id": "20095945", "uuid": "ae5355f4647f025e9506a53329734c4516a4098d", "public_ip": ['184.106.177.24'], "private_ip": ['10.180.128.207'], "extra": {'flavorId': '4', 'uri': 'https://servers.api.rackspacecloud.com/v1.0/544644/servers/20095945', 'imageId': '49', 'hostId': '5c916b5d52edc2f3f39feed720188d73', 'password': 'devops02U6HtQn26p', 'metadata': {}}}
{ "name": "devops03", "id": "20095947", "uuid": "8abd4227ecb5792072a271092b25f2049937e3bc", "public_ip": ['184.106.177.25'], "private_ip": ['10.180.128.206'], "extra": {'flavorId': '4', 'uri': 'https://servers.api.rackspacecloud.com/v1.
| # Rake Quick Reference | |
| # by Greg Houston | |
| # http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
| # ----------------------------------------------------------------------------- | |
| # Running Rake | |
| # ----------------------------------------------------------------------------- | |
| # running rake from the command-line: | |
| # rake --help |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Node struct { | |
| Value int | |
| } |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin