O dinheiro em novo formato
- Instalar Node.js
- Rodar comando npm install
- Enjoy!
Link da apresentação: https://docs.google.com/presentation/d/1CGb01uev7BGgKAZGxs_NgsBZ0pjRYMP-irvPBlMak-k/edit#slide=id.p
const bitcoin = require('bitcoinjs-lib'); | |
const EC = require('elliptic').ec; | |
const ec = new EC('secp256k1'); | |
// Generate a random private key | |
const privateKey = ec.genKeyPair().getPrivate('hex'); | |
// Convert the private key to a BitcoinJS keypair | |
const keyPair = bitcoin.ECPair.fromPrivateKey(Buffer.from(privateKey, 'hex')); |
const { ECPairFactory } = require('ecpair') | |
const bitcoin = require('bitcoinjs-lib') | |
const ecurve = require('ecurve') | |
const secp256k1 = ecurve.getCurveByName('secp256k1') | |
const schnorr = require('bip-schnorr') | |
const { bech32, bech32m } = require('bech32') | |
const bip38 = require('bip38') | |
const wif = require('wif') |
module.exports = { | |
NETWORKS: { | |
dogecoin: { | |
messagePrefix: '\x19Dogecoin Signed Message:\n', | |
bip32: { | |
public: 0x02facafd, | |
private: 0x02fac398 | |
}, | |
pubKeyHash: 0x1e, | |
scriptHash: 0x16, |
const bjs = require('bitcoinjs-lib') | |
, b58 = require('bs58check') | |
function BIP84(pub) { | |
// mainnet | |
this.pub_types = [ | |
'04b24746', // zpub | |
'02aa7ed3', // Zpub | |
] |
const isImage = (name, msg, req) => { | |
let proof = typeof req.files[name] !== "undefined" ? req.files[name] : undefined; | |
if (!proof) { | |
throw new Error(msg) | |
} | |
switch (proof.type) { | |
case 'image/jpeg': | |
return 'image/jpeg'; |
$breakpoints: "palm" "(max-width: 480px)", "lap" "(min-width: 481px)", "portable" "(max-width: 1023px)", "desk" "(min-width: 1024px)", "desk-wide" "(min-width: 1200px)" !default | |
=media-query($media-query) | |
$breakpoint-found: false | |
@each $breakpoint in $breakpoints | |
$name: nth($breakpoint, 1) | |
$declaration: nth($breakpoint, 2) | |
@if $media-query == $name and $declaration | |
$breakpoint-found: true | |
@media only screen and #{$declaration} |
const find = ( Model ) => ( query, sort = {} ) => | |
Model.find({}).or( query ).sort( sort ).exec() | |
const findOne = ( Model ) => ( query, populate = '' ) => | |
Model.findOne( query ).populate( populate ).exec() | |
const count = ( Model ) => ( query ) => | |
Model.count( query ).exec() | |
const save = ( Model ) => |
- Textos, imagens e css da landing page | |
- Página de contato | |
- Página de Termos | |
- Criar página no g+ | |
- Upload de fotos em perfil | |
- Validar todos os formulários | |
- Módulo de envio de emails | |
- |
Link da apresentação: https://docs.google.com/presentation/d/1CGb01uev7BGgKAZGxs_NgsBZ0pjRYMP-irvPBlMak-k/edit#slide=id.p
function carregarLocalizacao(dest) { | |
navigator.geolocation.getCurrentPosition(showpos, error, options); | |
function showpos(position) { | |
var lat = position.coords.latitude | |
, lng = position.coords.longitude; | |
console.log(lat + " " + lng); | |
location.href = 'https://maps.google.com/maps?saddr=' + lat + ',' + lng + '&daddr=' + dest; |