I hereby claim:
- I am tauzen on github.
- I am tauzen (https://keybase.io/tauzen) on keybase.
- I have a public key whose fingerprint is 6F3E 6BAF 57AD 3CE1 97B1 FE0B C429 5266 1A58 88BD
To claim this, I am signing this object:
| from django.conf.urls import patterns, include, url | |
| from django.contrib.auth.decorators import login_required | |
| from django.contrib.admin.views.decorators import staff_member_required | |
| from django.contrib import admin | |
| from application.views import ApplicationFormView, ApplicationListView | |
| admin.autodiscover() | |
| urlpatterns = patterns('', |
| <extension name="ivr_demo"> | |
| <condition field="destination_number" expression="^5000$"> | |
| <action application="answer"/> | |
| <action application="sleep" data="2000"/> | |
| <action application="ivr" data="demo_ivr"/> | |
| </condition> | |
| </extension> |
| <list name="domains" default="deny"> | |
| <node type="allow" domain="$${domain}"/> | |
| <node type="allow" cidr="192.168.0.2/32"/> | |
| </list> |
| $ adb remount | |
| $ adb pull /system/b2g/omni.ja | |
| $ unzip omni.ja -d Omni | |
| $ sed -i 's/this.DEBUG_ALL = false;/this.DEBUG_ALL = true;/g' Omni/modules/nfc_consts.js | |
| $ cd Omni | |
| $ zip -r omni.ja * | |
| $ adb push omni.ja /system/b2g | |
| $ adb reboot |
| window.addEventListener('DOMContentLoaded', function() { | |
| 'use strict'; | |
| console.log('DOMContentLoaded, checking for NFC'); | |
| if (!navigator.mozNfc) { | |
| console.log('NFC not available'); | |
| return; | |
| } | |
| navigator.mozSetMessageHandler('activity', (activity) => { |
| function byteToHexString(uint8arr) { | |
| if (!uint8arr) { | |
| return ''; | |
| } | |
| var hexStr = ''; | |
| for (var i = 0; i < uint8arr.length; i++) { | |
| var hex = (uint8arr[i] & 0xff).toString(16); | |
| hex = (hex.length === 1) ? '0' + hex : hex; | |
| hexStr += hex; |
| function joinUint8Arrays() { | |
| var args = Array.prototype.slice.call(arguments); | |
| var length = args.reduce(function(a, b) { return a + b.length; }, 0); | |
| var out = new Uint8Array(length); | |
| args.reduce(function(previousLen, buffer) { | |
| out.set(buffer, previousLen); | |
| return previousLen + buffer.length; | |
| }, 0); |
| # Creating a RSA private key | |
| $ openssl genrsa -out rsaprivkey.pem 1024 | |
| # Creating a cert file from priv key | |
| $ openssl req -new -x509 -key rsaprivkey.pem -out rsacert.pem | |
| # Converting from PEM to DER | |
| $ openssl x509 -outform der -in rsacert.pem -out rsacert.der | |
| # Convertin from DER to PEM |
I hereby claim:
To claim this, I am signing this object:
| from collections import namedtuple | |
| class Money(namedtuple('Money', ['amount', 'currency'])): | |
| def add(self, amount): | |
| return Money(self.amount + amount, self.currency) | |
| m = Money(20, 'USD') | |
| print(m) | |
| # Money(amount=20, currency='USD') |