title | date | description | categories | tags | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Building Borderlands Granular on Ubuntu 12.04 LTS |
2012-10-23 |
|
|
##What Borderlands is
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>colorPalette</key> | |
<dict> | |
<key>ArchiveExpectationsBarBottomColor</key> | |
<dict> | |
<key>a</key> | |
<real>0.20000000000000001</real> |
# -*- coding: utf-8 -*- | |
if __name__ == "__main__": | |
# Code code code... | |
# Code code code... | |
# Code code code... | |
from IPython import embed; embed() |
# prompt style and colors based on Steve Losh's Prose theme: | |
# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme | |
# | |
# vcs_info modifications from Bart Trojanowski's zsh prompt: | |
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt | |
# | |
# git untracked files modification from Brian Carper: | |
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt | |
export VIRTUAL_ENV_DISABLE_PROMPT=1 |
title | date | description | categories | tags | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Building Borderlands Granular on Ubuntu 12.04 LTS |
2012-10-23 |
|
|
##What Borderlands is
A refresher on matrix multiplication. Because your math classes were years ago. Here's the order I recommend:
# A coworker of mine covinced himself that the built-in pytest doctest support module didn't integrate with pytest-cov. | |
# He wrote his shim to get around this. Not necessary though. | |
# The gist is to make sure you have "--doctest-modules" and "--cov-report" and "--cov" arguments. | |
py.test . --doctest-modules --cov-report term --cov=. | |
# or | |
py.test mymodule --doctest-modules --cov-report term --cov=mymodule |
I started out pasting Python code into the AWS Lambda web GUI, right in that textarea. Got it working, making a call to a Slack API (whee!). So I had a working test case and I could test a refactor.
With the same code, I wanted to take advantage of the cool zipfile/ virtualenv upload support ("Create a Deployment Package") so I could use third-party libraries. Keeping the code itself the same (same as what I'd pasted into the textarea), the test should work again, as long as I packaged it right.
I kept trying to upload a zip with the same code, I thought, to AWS Lambda ... but I kept getting an error:
Properties p = System.getProperties(); | |
Enumeration keys = p.keys(); | |
while (keys.hasMoreElements()) { | |
String key = (String)keys.nextElement(); | |
String value = (String)p.get(key); | |
System.out.println(key + ": " + value); | |
} |
# ABOUT: https://en.wikipedia.org/wiki/Java_Cryptography_Extension | |
# AUTHOR: gist.github.com/hangtwenty | |
# PREREQUISITE: | |
# Download jce_policy*.zip from Oracle: | |
# - Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html | |
# - Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html | |
unzip $HOME/Downloads/jce_policy*.zip -d $HOME/Downloads/jce_policy_jars | |
jre_path="$JAVA_HOME/jre" | |
dest="$jre_path/lib/security" |