Skip to content

Instantly share code, notes, and snippets.

@clemsos
clemsos / sighashes.js
Last active May 25, 2022 11:13
Hardhat script to generate all 4-bytes signature hashes for all Unlock contracts (shows a markdown array in the console)
const contracts = require('@unlock-protocol/contracts')
const { ethers } = require('hardhat')
const md = (sigs) => {
// show markdown array on screen
console.log('| Type | Name | SigHash |')
console.log('|---|---|---|')
sigs.forEach(([type, name, sighash]) =>
console.log(`| ${type} | ${name} | ${sighash} |`)
@clemsos
clemsos / import_crater.py
Created May 6, 2021 14:48
Import data into Crater craterapp.com
import requests
import re
import json
# set headers for lavarel
headers = { "Accept": "application/json" }
# session to store cookies
sess = requests.Session()
{"url":"https://link.medium.com/ZSCiKq63NU","postedBy":"clemsos","metadata":{},"context":null,"upvotes":[],"_id":"6he0NMOaIDsFIqL9"}
{"url":"https://m.isaca.org/About-ISACA/History/Documents/ISACA-Glossary-English-Chinese-Simplified_mis_Chi_0615.pdf","postedBy":"clemsos","metadata":{},"context":null,"upvotes":[],"_id":"7bMe8ECX6Aav93xc"}
{"metadata":{},"context":null,"upvotes":[],"_id":"CpmoIrxrL6WJz9D9"}
{"url":"https://docs.google.com/presentation/d/1YdrJPGRLTK2FQLy9zS-8DRHFtPbVBwX1EhrDzXnULTY/mobilepresent?slide=id.p","postedBy":"kidproto","metadata":{"name":"Google Docs","title":"EthCC 2019","description":"Ethereum 2.0 phase 0 Deep dive into the key objects","thumbnail":"https://lh4.googleusercontent.com/g21t-NmkFDCR_ju2YPmuplPyEIqQFGnqKSfLMSbLJt1S052-PJPhV4jN3Cout2bhZr7PlQ=w1200-h630-p"},"context":null,"upvotes":[],"_id":"F9kxCW7OO2cmVIej"}
{"url":"https://itnext.io/part-1-building-a-bookmark-manager-telegram-bot-node-js-vue-js-972bb7198def","postedBy":"clemsos","metadata":{"name":"ITNEXT","title":"[Part
@clemsos
clemsos / stations_clusters_1.json
Last active January 17, 2019 14:57
Weather stations clusters coordinates
[
{
"coords": [
91.75766071072317,
20.540037858066356
],
"count": 8020
},
{
"coords": [
@clemsos
clemsos / Gaussienne.ipynb
Last active October 4, 2018 12:59
Gausienne test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clemsos
clemsos / .block
Last active October 2, 2018 19:47
Gaussienne
license: mit
@clemsos
clemsos / .block
Created October 2, 2018 19:21
Gaussienne
license: mit
@clemsos
clemsos / .block
Last active July 5, 2018 11:27
Earth from above
license: mit
@clemsos
clemsos / create_osm_nx_map.ipynb
Created February 13, 2018 19:33
Create NetworkX maps of Chinese cities
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clemsos
clemsos / .block
Last active February 9, 2018 18:40
Top500 supercompters
license: mit