Skip to content

Instantly share code, notes, and snippets.

# https://web3py.readthedocs.io/en/stable/web3.eth.account.html
import json
import os
from web3 import Web3
from django.conf import settings
from api.lib import w3
{
"keys": ["stripe_token"],
"values": [
["tok_18bZWbAF7jKPf7ChC7DVOsb0"],
["tok_18bZWbAF7jKPf7ChGZrtUWo3"],
["tok_18bZWbAF7jKPf7Ch3SwGKRD4"],
["tok_18bZWbAF7jKPf7Chl3tzAgsu"],
["tok_18bZWbAF7jKPf7ChmfRMWZ87"],
["tok_18bZWbAF7jKPf7Ch1UF106gi"],
["tok_18bZWbAF7jKPf7Chp9c3ZU64"],
@jordanmessina
jordanmessina / Output
Created September 29, 2014 19:11
Updated Arduino Code
S1 220in S2 218in
S1 220in S2 219in
S1 218in S2 219in
S1 217in S2 220in
S1 219in S2 219in
S1 216in S2 220in
S1 169in S2 49in
S1 169in S2 217in
S1 217in S2 219in
S1 217in S2 219in
NetworkManager[3431]: <info> monitoring kernel firmware directory '/lib/firmware'.
NetworkManager[3431]: <info> rfkill0: found WiFi radio killswitch (at /sys/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/ieee80211/phy0/rfkill0) (driver ath9k_htc)
NetworkManager[3431]: <error> [1408721203.958091] [nm-dbus-manager.c:332] nm_dbus_manager_start_service(): Could not acquire the NetworkManager service.
Error: 'Connection ":1.0" is not allowed to own the service "org.freedesktop.NetworkManager" due to security policies in the configuration file'
NetworkManager[3431]: <error> [1408721203.961555] [main.c:633] main(): failed to start the dbus service.
NetworkManager[3431]: <info> exiting (error)
platform/nm-linux-platform.c: In function '_nm_platform_link_get':
platform/nm-linux-platform.c:2141:75: error: declaration of 'link' shadows a global declaration [-Werror=shadow]
platform/nm-linux-platform.c: In function 'link_add':
platform/nm-linux-platform.c:2174:20: error: declaration of 'link' shadows a global declaration [-Werror=shadow]
platform/nm-linux-platform.c: At top level:
platform/nm-linux-platform.c:2970:49: error: invalid application of 'sizeof' to incomplete type 'struct ifla_vxlan_port_range'
platform/nm-linux-platform.c: In function 'vxlan_info_data_parser':
platform/nm-linux-platform.c:3011:29: error: dereferencing pointer to incomplete type
platform/nm-linux-platform.c:3012:29: error: dereferencing pointer to incomplete type
cc1: all warnings being treated as errors

Keybase proof

I hereby claim:

  • I am jordanmessina on github.
  • I am jordanmessina (https://keybase.io/jordanmessina) on keybase.
  • I have a public key whose fingerprint is 0191 40A8 31A2 CA6E 209D 647E A9B1 BAAB AAAC E11F

To claim this, I am signing this object:

@jordanmessina
jordanmessina / actaway.js
Created November 4, 2013 17:49
ActAway.com Javascript Cheat
var answer = $('#act').attr('data-answer');
for(var i=0; i<answer.length; i++){
$('.letters>li>a').each(function(index, val){
if($(val).text() == answer[i]){
$(val).click();
return false;
}
});
}
@jordanmessina
jordanmessina / example.html
Created February 18, 2013 18:27
This is an example of how you can dynamically change which Forge product a single button will open the checkout for. This example is integrated with the "PayPal Buy Now" button.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
<script src="https://www.forgesimple.com/javascript/boom-goes-the-checkout-v1.js" type="text/javascript"></script>
<link href="https://www.forgesimple.com/stylesheets/buttons.css" rel="stylesheet" type="text/css">
<script type='text/javascript'>
$(document).ready(function(){
$('#paypal-select').change(function(){
switch($('#paypal-select').val())
@jordanmessina
jordanmessina / count_the_Is.py
Created November 29, 2012 18:18
When given a blog rss feed, count_the_Is.py determines the number of first-person pronouns as a percentage of the total text.
#!/usr/bin/env python
import sys
import feedparser
from pyquery import PyQuery as pq
FIRST_PERSON_PRONOUNS = [
' I ', ' I\'d ', ' I\'m ',
' me ', ' my ', ' mine ', ' myself ', ' Me ', ' My ', ' Mine ', ' Myself ',
]