Skip to content

Instantly share code, notes, and snippets.

View yangwao's full-sized avatar
🥋
Mastering the code

Matej yangwao yangwao

🥋
Mastering the code
View GitHub Profile
# original post: https://rentry.org/sd-loopback-wave
# original author: https://rentry.org/AnimAnon
import os
import platform
import numpy as np
from tqdm import trange
import math
import subprocess as sp
import string
import random
@marks
marks / 0-readme.md
Last active January 25, 2023 12:10
Airtable => Vestaboard integration
@DavidWells
DavidWells / netlify.toml
Last active February 7, 2024 08:50
All Netlify.toml & yml values
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)

Can we create a smart contract VM on nodejs using Dat?

Ethereum is a trustless network of VMs which run smart contracts submitted by users. It uses proof-of-work to synchronize state across the network, and has every node execute the contracts in order to verify the state's validity. Each transaction is stored in the blockchain for replayability. Read more about it here.

Ethereum's "trustless network" model has some disadvantages:

  • Transaction processing is slow - it maxes at roughly 25tx/s right now for all contracts combined.
  • Every transaction costs money to execute.
  • The entire blockchain state must be shared across the computing network.
  • No private transactions.
@Kixunil
Kixunil / ucsfa.md
Last active June 19, 2017 11:19
User coordination of soft fork activation

User coordination of soft fork activation

Abstract

This document proposes a novel way to improve coordination of users who wish to activate a new soft fork in Bitcoin. The main idea is to use smart contracts to incentivize users to actually enforce the soft fork with lower risk of support being too low. At the same time the contract is in effect only if significant part of economy agrees to it. The contract also signals the intent to miners and other users in a way that would be otherwise expensive for sybil attackers. This proposal also suggests an interesting way to pay developers for the development of the soft fork code.

Acknowledgement

@rkaramandi
rkaramandi / nginx-and-certbot-config.md
Last active February 15, 2024 21:20
Running NGINX and CertBot Containers on the Same Host

Running NGINX and CertBot Containers on the Same Host

The Problem

A lot of people run into the problem of running Let's Encrypt's CertBot Tool and an NGINX on the same container host. A big part of this has to do with CertBot needing either port 80 or 443 open for the tool to work as intended. This tends to conflict with NGINX as most people usually use port 80 (HTTP) or 443 (HTTPS) for their reverse proxy. Section 1 outlines how to configure NGINX to get this to work, and Section 2 is the Docker command to run CertBot.

1. NGINX Configuration

I use Docker Compose (docker-compose) for my NGINX server. My docker-compose.yml file looks something like this:

@itod
itod / split_keyboards.md
Last active April 28, 2024 19:44
Every "split" mechanical keyboard currently being sold that I know of
@daliborgogic
daliborgogic / delay.js
Created December 16, 2016 15:26
Node.js Async/Await delay
'use strict'
const timeout = ms => new Promise(res => setTimeout(res, ms))
function convinceMe (convince) {
let unixTime = Math.round(+new Date() / 1000)
console.log(`Delay ${convince} at ${unixTime}`)
}
async function delay () {