This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ethers } from "ethers" | |
import { update } from "./store" | |
const provider = new ethers.providers.Web3Provider(window.ethereum) | |
provider.on("network", (oldNetwork, newNetwork) => update(state => ({ | |
...state, | |
chainId: ( newNetwork ?? oldNetwork ).chainId | |
}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:3:bafyreieq4lcvrv5buxh3v3izjfb7xdjeqmc4gq7usqhjwna5fmvnbwnrr4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = Object.freeze({ | |
/** RSA bits for key pair generation */ | |
KEY_BITS: 512, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CloudWatchDashboard: | |
Type: AWS::CloudWatch::Dashboard | |
Properties: | |
DashboardName: !Sub ${AWS::StackName} | |
DashboardBody: !Sub | |
- | | |
{ | |
"periodOverride": "inherit", | |
"widgets": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const path = require('path') | |
/** Creates the initial "migrations" table. Even if this is run | |
* every migration is not that much weight. */ | |
async function initSchema(pool, table) { | |
await pool.query(`CREATE TABLE IF NOT EXISTS ${pool.escapeIdentifier(table)} (version SMALLINT PRIMARY KEY)`) | |
} | |
async function getVersions(pool, table) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# i3 config file (v4) | |
# | |
# Please see https://i3wm.org/docs/userguide.html for a complete reference! | |
set $mod Mod4 | |
# Autostart | |
exec --no-startup-id nitrogen --restore & | |
exec --no-startup-id picom -CGb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Compass</title> | |
</head> | |
<body> | |
<svg id="compass" width="220" height="220" viewBox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sprite { | |
constructor(rect) { | |
this._visible = true | |
this.dirty = 1 | |
this.rect = rect | |
} | |
get visible() { | |
return this._visible | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
data = {} | |
with open('countries.csv', 'r') as fr: | |
reader = csv.reader(fr, dialect='excel-tab') | |
for row in reader: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lcd_rotate=2 |
NewerOlder