Skip to content

Instantly share code, notes, and snippets.

@chnrxn
chnrxn / fpm-templates.md
Created April 7, 2021 00:24
fpm discoveries
@chnrxn
chnrxn / python-logging.py
Created April 14, 2017 17:50
Set LOGLEVEL in the environment to influence log levels
import logging
import os
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel( getattr(logging, os.getenv("LOGLEVEL", "INFO") ) )
@chnrxn
chnrxn / README.md
Last active February 1, 2016 08:30

This example shows how to stop a producer in a goroutine writing endlessly into a pipe.

One use case could be iterating git log messages until finding a specific commit, and thus ending the git log command.

@chnrxn
chnrxn / readme.md
Last active September 11, 2015 02:36
Fix for SSL protocol errors when connecting to servers with SSLv2 disabled.

Code in StackOverflow answer http://stackoverflow.com/a/24166498/41957.

To use, download sslwrap.py into your project or PYTHONPATH

curl -skO https://gist.githubusercontent.com/chnrxn/8fce01a0261b975dcb35/raw/sslwrap.py

and import it near the top of your code.

import sslwrap

@chnrxn
chnrxn / readme.md
Last active August 29, 2015 14:24
job pool in bash

test drive

curl -s https://gist.githubusercontent.com/chnrxn/360969b949bee4fd33d6/raw/wait_jobs.sh | bash

results

https://www.youtube.com/watch?v=29LLRKIL_TI start
https://www.youtube.com/watch?v=BGDKrf2otjU start
https://www.youtube.com/watch?v=RdwZXw4B_xM start

https://www.youtube.com/watch?v=CF9S4QZuV30 start

@chnrxn
chnrxn / breakpath.sh
Last active August 29, 2015 14:24
break down $PATH in bash
( IFS=: ; for x in $PATH; do echo $x ; done )
@chnrxn
chnrxn / argh_parser.py
Last active August 29, 2015 14:21
wrapper for argh
import argh, dpath
class Parser(argh.ArghParser):
def reg(self, func):
self.add_commands([func])
return func
parser = Parser()
@parser.reg
def foo(parm1):
class Bar:
def nimble(self):
print parm1
return Bar()
bar1 = foo("hello")
bar1.nimble()
bar2 = foo("world")
ARCHIVEURL='https://github.com/_org_/_repo_/archive/master.tar.gz'
BASEDIR=pysetup-master
mkdir -p ${BASEDIR}
{
pushd ${BASEDIR} && {
curl -ksL ${ARCHIVEURL} | tar zxf - --strip-components 1
} && popd
make -f ${BASEDIR}/makefile
echo "export PIP_CERT=`pwd`/${BASEDIR}/digicert-ev.pem" >> penv/bin/activate

Introduction

The PayPal SDC industry outreach group is organizing a series of seminar-style events called Conversations, The Fintech Xchange

The series of events is:

  • A venue for technologists to meet and network with peers in financial technology.
  • A showcase for technologists to share their experiences with other members of the industry.

Topics can be anything related finance technology - security, innovations, big-data, cloud, payment networks, best-practices, etc.