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
export const OfflineStatusModal = () => { | |
return ( | |
<div className="justify-center items-center bg-black/80 flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none"> | |
<div className="relative w-auto my-6 mx-auto max-w-3xl"> | |
{/*content*/} | |
<div className="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-background outline-none focus:outline-none"> |
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 { useState, useEffect } from 'react'; | |
async function performNetworkCheck() { | |
const endpoint = 'https://www.google.com'; | |
try { | |
const response = await fetch(endpoint, { | |
method: 'HEAD', | |
cache: 'no-cache', | |
mode: 'no-cors', |
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
{ | |
"workbench.startupEditor": "none", | |
"window.autoDetectColorScheme": true, | |
"workbench.preferredDarkColorTheme": "Min Dark", | |
"workbench.preferredLightColorTheme": "Min Light", | |
"editor.minimap.enabled": false, | |
"breadcrumbs.enabled": false, | |
"editor.renderWhitespace": "all", | |
"emmet.includeLanguages": { | |
"javascript": "javascriptreact" |
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
<ng-container *ngFor="let item of APIresponse | keyvalue: indexOrderAsc"> | |
{{item.key.replaceAll('_', ' ') | titlecase}}:{{item.value}} | |
</ng-container> |
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
function constructEndpoint(lnRequest) { | |
if (lnRequest.includes("@")) { | |
return DECODE_LN_ADDRESS; | |
} | |
if (lnRequest.startsWith("lnurl") && lnRequest.includes("lnurl")) { | |
return DECODE_LNURL; | |
} | |
if (lnRequest.startsWith("ln")) { |
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 { defineConfig } from "vite"; | |
import react from "@vitejs/plugin-react"; | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
server: { | |
proxy: { | |
"/api": { | |
target: "http://localhost:3001", | |
changeOrigin: true, |
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
from bitcoinlib.wallets import Wallet | |
from bitcoinlib.mnemonic import * | |
passphrase = Mnemonic().generate() | |
print(passphrase) | |
w = Wallet.create("MyFirstWallet", witness_type='segwit', keys=passphrase, network='bitcoin') | |
WalletKeys = (w.get_keys(number_of_keys=10)) | |
for k in WalletKeys: |
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
def setup_network(self): | |
"""Setup the test network topology""" | |
def run_test(self): | |
"""Main test logic""" | |
self.log.info("Starting test!") | |
"""Let the user know the test has started""" | |
self.sync_all(self.nodes) |
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 Counter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 0 | |
}; | |
this.decrement = this.decrement.bind(this); | |
this.increment = this.increment.bind(this); | |
this.reset = this.reset.bind(this); |
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 React, { useState } from 'react'; | |
import ReactDOM from 'react-dom'; | |
const style = { | |
table: { | |
borderCollapse: 'collapse' | |
}, | |
tableCell: { | |
border: '1px solid gray', | |
margin: 0, |
NewerOlder