Skip to content

Instantly share code, notes, and snippets.

View dantrevino's full-sized avatar
💭
I may be slow to respond.

Dan Trevino dantrevino

💭
I may be slow to respond.
View GitHub Profile
@dantrevino
dantrevino / README.md
Created April 4, 2019 17:35 — forked from fanvyr/README.md
A smooth registration form

Registration Form

Demo registration-demo

Notes

API check
The snippet tries to verify if the mail is okay or bad in general by reaching out to my/a backend.
Therefor the statuscode is important: return a 2xx for okay, and a 4xx with a message for not okay.

@dantrevino
dantrevino / VerticalTabs.vue
Created December 5, 2018 04:32 — forked from jacekkarczmarczyk/VerticalTabs.vue
Vuetify vertical tabs
<template>
<div :style="containerStyle" class="vertical-tabs" :class="{'vertical-tabs--vertical-text': verticalText, 'vertical-tabs--horizontal-text': !verticalText}">
<v-tabs :value="value" @input="$emit('input', $event)" :show-arrows="verticalText" :color="color" :slider-color="sliderColor" :style="tabsStyle">
<v-tab v-for="item in items" :key="item">{{ item }}</v-tab>
</v-tabs>
</div>
</template>
<script>
export default {
@dantrevino
dantrevino / gist:6798dc282f33962b82f5ac40fd702217
Created August 27, 2018 20:35
tiny-secp256k1 build on mac
tiny-secp256k1@1.0.0 install /Users/dtrev1/projects/NoteRiot/node_modules/tiny-secp256k1
> node-gyp rebuild
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
dig yahoo.com
; <<>> DiG 9.12.2-P1 <<>> yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24731
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
@dantrevino
dantrevino / blockstack-data-share.md
Last active August 15, 2018 17:55
Blockstack data sharing

Load the public key for Graphite (note: I'm using the stealthy example here)

export function loadKey() {
  axios.get(url + 'pk.txt') // target app gaia hub url and public key
  .then((response) => {
    this.setState({
      stealthyKey: response.data,
      stealthyConnected: true
    })
for raspbery pi 3 yon can test this
########################################################
#install de go V1.10.2 pour processeur ARM
# voir https://gist.github.com/simoncos/49463a8b781d63b5fb8a3b666e566bb5
########################################################
sudo apt-get -y autoremove golang
cd ~
#see : https://golang.org/dl/
wget https://dl.google.com/go/go1.10.3.linux-armv6l.tar.gz
dan@chaos   ~/projects/NoteRiot    master  1  npm i --save blockstack@18.0.2
> tiny-secp256k1@1.0.0 install /home/dan/projects/NoteRiot/node_modules/tiny-secp256k1
> node-gyp rebuild
CXX(target) Release/obj.target/secp256k1/native/addon.o
../native/addon.cpp: In instantiation of ‘unsigned int {anonymous}::assumeCompression(const I&, const A&) [with long unsigned int index = 2; I = Nan::FunctionCallbackInfo<v8::Value>; A = v8::Local<v8::Object>]’:
../native/addon.cpp:141:50: required from here
../native/addon.cpp:79:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
flow || true
Launching Flow server for /home/dan/projects/cli-blockstack
Spawned flow server (pid=14121)
Logs will go to /tmp/flow/zShomezSdanzSprojectszScli-blockstack.log
src/cli.js:3
3: const blockstack = require('blockstack');
^^^^^^^^^^^^ blockstack. Required module not found
src/keys.js:3
== chrome ext code ==
document.getElementById('sign-in').addEventListener('click', function() {
var scopes = ['storage']
console.log(chrome.runtime.getURL('popup.html'))
console.log(chrome.runtime.getURL('manifest.json'))
blockstack.redirectToSignIn(chrome.runtime.getURL('popup.html'), chrome.runtime.getURL('manifest.json'), scopes)
})
== chrome ext console ==
tags/transactions.tag.html.js:4 transactions mounted
tags/my-app.tag.html.js:13 my-app detects user signed in
bundle.js:16706 No datastore contexts defined
bundle.js:16817 Driver gaia_hub implementes read_public
bundle.js:16817 Driver dropbox implementes read_public
bundle.js:16817 Driver s3 implementes read_public
bundle.js:16817 Driver blockstack_resolver implementes read_public
bundle.js:16817 Driver http implementes read_public
bundle.js:16817 Driver dht implementes read_public