Skip to content

Instantly share code, notes, and snippets.

View paolodina's full-sized avatar
😵‍💫
always on

Paolo Dina paolodina

😵‍💫
always on
  • 03:15 (UTC +02:00)
View GitHub Profile

IRC friends, enemies and others,

Control of freenode has recently been seized by the proprietors of Freenode Limited, a holding company established by a previous head of freenode and a third party as part of a deal with a corporate sponsor. The terms of that deal were not disclosed, and remain unknown to me.

At the time, we, freenode's volunteer staff, were given informal guarantees that staff retained operational control of the network. The same guarantees were repeated after leadership was passed on to a new head of staff. I don't

@sindresorhus
sindresorhus / esm-package.md
Last active September 1, 2026 12:44
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@mingderwang
mingderwang / hardhat.config.js
Created January 14, 2021 06:42
hardhat.config.js use ganache as default network (example)
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('@nomiclabs/hardhat-ethers');
require('@openzeppelin/hardhat-upgrades');
module.exports = {
defaultNetwork: "ganache",
networks: {
ganache: {
url: "http://172.17.144.1:7545",
@LeZuse
LeZuse / nx-completion.bash
Last active December 12, 2025 14:28
Bash completion for Nx – Extensible Dev Tools for Monorepos
#/usr/bin/env bash
# Bash completion for nx.dev project
# Inspired by https://github.com/jukben/fish-nx/blob/master/completions/nx.fish
# Prerequisites:
# brew install jq fzf
# Installation
# Source this file in your .bash_profile:
@Bilaboz
Bilaboz / profit_calculator.py
Last active September 18, 2021 16:33
Rollercoin profit calculator
import json
import urllib.request
current_hashrate = float(input("Your hashrate (TH/s): "))
network_powers = [float(input("BTC network power (EH/s): ")), float(input("DOGE network power (EH/s): ")), float(input("ETH network power (EH/s): "))]
rewards = [0.00009, 240, 0.0017]
names = ["BTC", "DOGE", "ETH"]
r = urllib.request.urlopen("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin%2Cdogecoin%2Cethereum&vs_currencies=usd")
@joshnuss
joshnuss / Clock.svelte
Last active January 16, 2022 09:54
A Svelte store that acts as a clock/interval timer
<script>
import timer from './timer.js'
// create clock that updates every 500ms
const clock = timer({interval: 500})
</script>
<!-- Expression will update every 500ms -->
Current time is: {$clock}
@joshnuss
joshnuss / httpStore.js
Last active October 11, 2023 11:29
A Svelte store backed by HTTP
import { writable } from 'svelte/store'
// returns a store with HTTP access functions for get, post, patch, delete
// anytime an HTTP request is made, the store is updated and all subscribers are notified.
export default function(initial) {
// create the underlying store
const store = writable(initial)
// define a request function that will do `fetch` and update store when request finishes
store.request = async (method, url, params=null) => {
@swyxio
swyxio / readme.md
Last active January 16, 2022 10:36
svelte society day talks and resources -
@Zsailer
Zsailer / schemaorg-pydantic.ipynb
Last active May 11, 2024 15:17
Define and validate schema.org structured data in Python with Pydantic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justinatack
justinatack / Quasar Framework Dark Theme Login Form Card Component
Created April 17, 2019 08:14
Quasar Framework Dark Theme Login Form Card Component
<template>
<q-page
class="window-height window-width row justify-center items-center"
style="background: linear-gradient(135deg, #EA5C54 0%,#bb6dec 100%);"
>
<div class="column">
<div class="row">
<q-card square dark class="q-pa-md q-ma-none no-shadow bg-grey-10" style="width:320px;">
<q-card-section class="q-mt-xl q-mb-md">
<p class="text-weight-bolder text-grey">Login to your account</p>