Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mquandalle's full-sized avatar

Maxime Quandalle mquandalle

View GitHub Profile
@mquandalle
mquandalle / diff-codepostaux.js
Last active December 12, 2021 19:40
Differences entres les fichiers Etalab et La Poste pour les données de codes postaux
const communesEtalab = await (
await fetch('https://unpkg.com/@etalab/decoupage-administratif@0.9.0-0/data/communes.json')
).json();
const laPosteCSV = await fetch(
'https://www.data.gouv.fr/fr/datasets/r/554590ab-ae62-40ac-8353-ee75162c05ee'
);
const communesLaPoste = (await laPosteCSV.text()).split('\n').reduce((acc, line) => {
const [codeInsee, , codePostal] = line.split(';');
acc[codeInsee] = (acc[codeInsee] ?? []).concat(codePostal);
<style>
iframe {
position: fixed;
height: 100%;
width: 100%;
top: 0;
left: 0;
border: none;
}
import Tooltip from "antd/lib/tooltip";
console.log(Tooltip); // returns "undefined" -- sync up later

Thoughts on a Meteor ORM

While we're approaching the 1.0 release of Meteor, the need and interest in additional databases support (other than MongoDB) has risen consequently. Thus, SQL support is the second most requested feature on the official meteor roadmap (after server-side rendering) and there have been various demands on the forums about supporting Redis (also on the roadmap), RethinkDB, LevelDB, Neo4J, ElasticSearch, Mysql/MariaDB, PosgreSQL, SQLite and some other. More importantly the Meteor community has started to work on atmosphere packages that bring support for these databases and it appeared to be a very difficult task – most projects were abandoned.

The problem

What makes the integration of a new database a lot harder in Meteor than in most other web frameworks (including “full stack” JavaScript frameworks like Derby or Sails) lies in the third [principle of Meteor](http://docs.meteor.com/

Split the Peercoin coinstake transaction

Proof-of-stake mining (or minting) is much more environmentally friendly (near to zero electricity consumption) and decentralized (no ASICs) than the widespread proof-of-work mining. However it has an unresolved flaw known as the “nothing at stake” issue. This post propose a solution to this problem based on Peercoin, the pioneer proof-of-stake cryptocurrency.

Problem

The above picture represents a blockchain. Blocks in green compose the main chain, and blocks in red compose orphan chains.

Keybase proof

I hereby claim:

  • I am mquandalle on github.
  • I am mquandalle (https://keybase.io/mquandalle) on keybase.
  • I have a public key whose fingerprint is AD1E 0DD6 5E86 C787 D602 EDF1 5D34 826F E06D A95D

To claim this, I am signing this object:

@mquandalle
mquandalle / install-ethereal.sh
Last active August 29, 2015 14:01 — forked from maran/install
Install go-ethereum client on Ubuntu 14.04
#!/bin/sh
if ! lsb_release -sr | grep 14.04 > /dev/null; then
echo "This script is made for Ubuntu 14.04, this probably won't work."
echo -p "Do you want to try it anyway? (y/n) " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
@mquandalle
mquandalle / README.md
Last active August 15, 2022 13:31
Karma police: a reputation system on ethereum

Karma police: a simple reputation system on top of ethereum

Tired of the alcoins mania? Here is a coin that you cannot exhange or lose. It aims to be a reputation system. Every n=42 days m=1000000 karma units are issued. So it's a disinflationary unit.

Users of this system can votes ("+1") for others if they do a great contribution. A user with 1% of the total amount of karma will "distribute" 1% of the new m units. These new karma units are equally distributed between all users that have received a vote from him.

Persistent storage usage

Global informations