Skip to content

Instantly share code, notes, and snippets.

Anderson Juhasc Anderson-Juhasc

Block or report user

Report or block Anderson-Juhasc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Anderson-Juhasc
Anderson-Juhasc / bip84.js
Last active May 6, 2019
BIP84 - Derives segwit + bech32 addresses from zpub and vpub in javascript: https://www.npmjs.com/package/bip84
View bip84.js
const bjs = require('bitcoinjs-lib')
, b58 = require('bs58check')
function BIP84(pub) {
// mainnet
this.pub_types = [
'04b24746', // zpub
'02aa7ed3', // Zpub
]
View isImage.js
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';
View media-query.sass
$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}
View mongose.js
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 ) =>
View bancocripto.txt
- 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
-
View gist:6d11e0053816ff654fbd61e595a1c2a7
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;
@Anderson-Juhasc
Anderson-Juhasc / index.html
Last active Mar 25, 2017
Socket.io bitcoin address
View index.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
<script type="text/javascript">
var socket = io('ws://localhost:8000', {
View gum.js
/**
* Main js file for WebRTC-Camera-Resolution finder
* Created by chad on 7/19/2014.
* Modified January 1, 2016
*/
'use strict';
//Global variables
var video = $('#video')[0], //where we will put & test our video output
View getUserMedia.js
//check for getUserMedia
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia;
let devices = [];
if (navigator.mediaDevices) {
navigator.mediaDevices.enumerateDevices()
.then(function (deviceInfos) {
for (let i = 0; i !== deviceInfos.length; ++i) {
You can’t perform that action at this time.