This file contains 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: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
This file contains 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
# 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: |
This file contains 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
# coding=utf-8 | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer |
This file contains 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
""" | |
mdns_util | |
Provides a class to wrap pybonjour functionality and references to work | |
with Tornado's IOLoop for event handling. | |
Sample usage: | |
>>> from mdns_util import MDNS | |
>>> from tornado.ioloop import IOLoop | |
... |
This file contains 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
class StreamHandler(AMSHandler): | |
@tornado.web.asynchronous | |
def get(self): | |
self.post() | |
@tornado.web.asynchronous | |
def post(self): | |
self.write("<pre>") | |
self.ioloop = tornado.ioloop.IOLoop.instance() | |
self.pipe = self.get_pipe() |
This file contains 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
import datetime | |
import functools | |
import logging | |
import os | |
import time | |
import gobject | |
import gtk |
This file contains 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
PACKAGE=$(shell basename `pwd`) # "" | |
VERSION=$(shell git describe --tags) # ignorable | |
OUTPUT_NAME=$(PACKAGE)-$(VERSION) | |
.PHONY: build_pex | |
build_pex: clean $(OUTPUT_NAME).pex | |
.PHONY: prepare_pex | |
prepare_pex: | |
pip install --upgrade pip wheel pex |
This file contains 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 python2.7 | |
import itertools | |
def datatype(type_name, params): | |
"""A faster/more efficient namedtuple replacement with better subclassing properties. | |
>>> RustLibrary = datatype('RustLibrary', ['sources', 'dependencies']) | |
>>> rl = RustLibrary([1,2,3], [4,5,6]) |
This file contains 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 | |
from collections import deque | |
class TaskGraph(object): | |
''' simple acyclic, directed property graph with iteration | |
use case: | |
1) model nodes as dicts and dependencies as directed edges (name=occ -> name=twist) | |
2) start with all nodes colored down (_st=0) |
This file contains 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 | |
# Checking if python is installed | |
if ! [ -x "$(command -v python)" ]; then | |
echo 'Error: python is not installed. :(' >&2 | |
exit 1 | |
fi | |
# Build directory | |
export OLDDIR=$PWD |
OlderNewer