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
var bip39 = require("bip39"); | |
var ethwallet = require('ethereumjs-wallet'); | |
var ProviderEngine = require("web3-provider-engine"); | |
var WalletSubprovider = require('web3-provider-engine/subproviders/wallet.js'); | |
var Web3Subprovider = require("web3-provider-engine/subproviders/web3.js"); | |
var Web3 = require("web3"); | |
// Insert raw hex private key here, e.g. using MyEtherWallet | |
var wallet = ethwallet.fromPrivateKey(Buffer.from('abcdef', 'hex')); |
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/python | |
import uuid | |
import os | |
from zipfile import ZipFile, is_zipfile | |
import sys | |
import time | |
from random import randint | |
import argparse | |
import re |
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
<?php | |
/** | |
* @file | |
* User Profile2 MYPROFILE2TYPE. | |
*/ | |
/** | |
* Page callback for user profile2 MYPROFILE2TYPE form. | |
*/ | |
function MYMODULE_load_profile2_MYPROFILE2TYPE_form($form, &$form_state, $user = NULL) { |
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
<!DOCTYPE html> | |
<title>D3 + Leaflet (fork from bost.ocks.org/mike/leaflet/)</title> | |
<style> | |
#map { width: 960px; height: 500px;} | |
path { fill: #000; fill-opacity: .2; stroke: #fff; stroke-width: 1.5px;} | |
path:hover { fill: brown;fill-opacity: .7;} | |
</style> | |
<p id="map"><p> | |
<script src="http://d3js.org/d3.v2.min.js?2.9.3"></script> | |
<script src="leaflet.js"></script> |
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 node | |
/* | |
* Parsing BIG compressed data with Node.js and SAX | |
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2 | |
* Greg Miell 2012 | |
*/ | |
// Simple string trim prototype extension | |
String.prototype.trim = function() { |
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
(function(k) { | |
var Button = function(a, x, y) { | |
this.initialize(a,x,y) | |
},p = Button.prototype = new DisplayObject; | |
p.left = 0; | |
p.top = 0; | |
p.ypos = 0; | |
p.image = null; | |
p.snapToPixel = true; |
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
/************************************************************************** | |
* OSM2GEO - OSM to GeoJSON converter | |
* OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
* corresponding GeoJSON object. | |
* | |
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
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
<?php | |
/** | |
* Implements template_preprocess_field(). | |
*/ | |
function THEME_preprocess_field(&$vars) { | |
// If the view mode is "full" use <h2> for the field labels. Otherwise, | |
// assume a teaser or more compact view mode is being displayed, and use <h3>. | |
$vars['heading'] = ($vars['element']['#view_mode'] == 'full') ? 'h2' : 'h3'; |
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
var allPolygons = []; | |
function setPolys(geom) { | |
/* geom: a GeoJSON object. | |
Parse geom, and add it as a child to the global Raphael object, R. | |
*/ | |
//geom.type either Polygon or MultiPolygon | |
var translationFunction = function(coords) { | |
var projected = Projections.contiguous.forward(coords); | |
var x = 217+(projected[0]*190/2400000); |