Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Hendrickson markmhx

View GitHub Profile
View blockstack connect install
$ npm install --save @blockstack/connect
> tiny-secp256k1@1.0.1 install /private/var/www/humans/node_modules/tiny-secp256k1
> node-gyp rebuild
CXX(target) Release/obj.target/secp256k1/native/addon.o
In file included from ../native/addon.cpp:4:
In file included from ../../nan/nan.h:221:
In file included from ../../nan/nan_converters.h:67:
View gist:fb97fadc08425e31aed8eb1ee39ade29
document.addEventListener("DOMContentLoaded", function(event) {
document.getElementById('signin-button').addEventListener('click', function(event) {
event.preventDefault()
const authRequest = blockstack.makeAuthRequest(
blockstack.generateAndStoreTransitKey(),
'http://localhost:5000/',
'http://localhost:5000/manifest.json',
['store_write', 'publish_data'],
'http://localhost:5000/',
View gist:098132dc82ee2927a86e111d1fcd92b8
document.addEventListener("DOMContentLoaded", function(event) {
const authRequest = blockstack.makeAuthRequest(
blockstack.generateAndStoreTransitKey(),
'http://localhost:5000/',
'http://localhost:5000/manifest.json',
['store_write', 'publish_data'],
'http://localhost:5000/',
blockstack.nextHour().getTime(), {
solicitGaiaHubUrl: true
} // new options param
@markmhx
markmhx / gist:27ddec1b80c9c60ffb473e1e7cb5fe19
Created Jan 29, 2019
Task 7: Set up an Nginx reverse proxy –  sudo apt-get install nginx
View gist:27ddec1b80c9c60ffb473e1e7cb5fe19
root@markmhendrickson-hub:~/gaia/hub# sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fontconfig-config fonts-dejavu-core libfontconfig1 libgd3 libjbig0
libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip
libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter
libnginx-mod-mail libnginx-mod-stream libtiff5 libwebp6 libxpm4
nginx-common nginx-core
View gist:ae29843bec1181e9711f2167890d50cf
Verifying my Blockstack ID is secured with the address 1789gBX7w1XFPeG5SFKkbfsUbrHvnTvYRC https://explorer.blockstack.org/address/1789gBX7w1XFPeG5SFKkbfsUbrHvnTvYRC
@markmhx
markmhx / stylebee-pro-help-center-embed-template.html
Last active Nov 26, 2017
STYLEBEE pro help center video embed template
View stylebee-pro-help-center-embed-template.html
<div class="video">
<div>
<iframe src="https://www.youtube.com/embed/S7RNb7KCUgU?rel=0&amp;modestbranding=1&amp;autoplay=1&amp;showinfo=0&amp;fs=1&amp;color=white" frameborder="0" allowfullscreen="allowfullscreen"></iframe
</div>
</div>
@markmhx
markmhx / foursquare-checkin.json
Last active Nov 13, 2017
Example of check-in pulled from the Foursquare API
View foursquare-checkin.json
{
"meta": {
"code": 200,
"requestId": "5a09bb0a4434b9509cf028a7"
},
"notifications": [
{
"type": "notificationTray",
"item": {
"unreadCount": 0
View rake-cache-clear.bash
wasp $ rake cache:clear
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from <top (required)> at /Users/markhendrickson/.rvm/gems/ruby-2.3.1@wasp/gems/skim-0.10.0/lib/skim/sprockets.rb:3)
rake aborted!
Don't know how to build task 'cache:clear' (see --tasks)
/Users/markhendrickson/.rvm/gems/ruby-2.3.1@wasp/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/markhendrickson/.rvm/gems/ruby-2.3.1@wasp/bin/ruby_executable_hooks:15:in `eval'
View gist:8698679
Parse.Cloud.define('findStory', function(request, response) {
Parse.Cloud.useMasterKey();
var storyQuery = new Parse.Query('Story');
storyQuery.include('keptPhotos');
storyQuery.get(request.params.objectId).then(
function(story) {
response.success(story);
},
You can’t perform that action at this time.