This file contains hidden or 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 web3 = require('@solana/web3.js'); | |
const { Marinade, MarinadeConfig } = require('@marinade.finance/marinade-ts-sdk'); | |
const { StakePool } = require('@solana/spl-stake-pool'); | |
async function stakeToMarinade(connection, wallet, amountLamports) { | |
const marinade = new Marinade(new MarinadeConfig({ connection: connection, publicKey: wallet.publicKey })); | |
const { transaction } = await marinade.deposit(amountLamports); | |
const signature = await wallet.sendTransaction(transaction, connection); | |
console.log("Marinade Stake Signature:", signature); | |
} |
This file contains hidden or 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
⬡ |
This file contains hidden or 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
<html> | |
<head> | |
<meta name="twitter:image" content="<!-- Fill in the body content here -->" /> | |
<meta name="twitter:card" content="player" /> | |
<meta name="twitter:title" content="AudioCrawl in Twitter" /> | |
<meta name="twitter:description" content="AudioCrawl inside twitter?" /> | |
<meta name="twitter:player" content="https://www.audiocrawl.io/" /> | |
<meta name="twitter:player:width" content="360" /> | |
<meta name="twitter:player:height" content="800" /> |
This file contains hidden or 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
// @ts-check | |
import html from 'nanohtml' | |
const ui = { | |
button: document.querySelector('[data-load-more-blog]'), | |
layout: document.querySelector('.blogCards') | |
} | |
class LoadMore { | |
constructor({ button, layout }) { |
This file contains hidden or 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
// @ts-check | |
import html from 'nanohtml' | |
const ui = { | |
button: document.querySelector('[data-load-more-blog]'), | |
layout: document.querySelector('.blogCards') | |
} | |
class LoadMore { | |
constructor({ button, layout }) { |
This file contains hidden or 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 absoluteUrl from 'next-absolute-url' | |
Page.getInitialProps = async ({ req }) => { | |
const { protocol, host } = absoluteUrl(req, 'localhost:8004') | |
const jobs = await ( | |
await fetch(`${protocol}//${host}/api/allJobs.js`) | |
).json() | |
return { | |
jobs | |
} |
This file contains hidden or 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 { PHASE_PRODUCTION_SERVER } = | |
process.env.NODE_ENV === 'development' | |
? {} | |
: require('next-server/constants'); | |
module.exports = (phase, { defaultConfig }) => { | |
if (phase === PHASE_PRODUCTION_SERVER) { | |
// Config used to run in production. | |
return {}; | |
} |
This file contains hidden or 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
var http = require('http') | |
http.createServer(infinite).listen(9090) | |
function infinite (req, res) { | |
res.setHeader('Content-Type', 'application/json') | |
var seq = 0 | |
setInterval(function () { | |
res.write(JSON.stringify({value: seq++}) + '\n') | |
}, 100) |
This file contains hidden or 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
var pump = require('pump') | |
var ndjson = require('ndjson') | |
var through = require('through2') | |
var hyperquest = require('hyperquest') | |
pump( | |
hyperquest('http://localhost:9090'), | |
ndjson.parse(), | |
through.obj(write), | |
process.stdout |
This file contains hidden or 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
var hyperquest = require('hyperquest') | |
var JSONStream = require('JSONStream') | |
var through = require('through2') | |
var to = require('to2') | |
var from = require('from2-array') | |
module.exports = function (source, sink) { | |
var output = through() | |
var collections = [] |
NewerOlder