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 { AuthHandler } from "node_modules/next-auth/core"; | |
import { getServerAuthSession } from "@/server/auth"; | |
import { cookies, headers } from "next/headers"; | |
import { getCsrfToken } from "next-auth/react"; | |
import { authOptions } from "@/server/auth"; | |
import { type AuthAction } from "next-auth"; | |
import { redirect } from "next/navigation"; | |
import { createHash } from "crypto"; | |
export default async function Page({ |
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
/* Requires faker v8.0.2 */ | |
/* TODO: Replace "@acme.com with also a fake domain */ | |
// Generates defined number of random users, with extraFields as needed | |
async function generateFakeUsers({ | |
count = 1, | |
extraFields, | |
}: { | |
count: number; |
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 fetch = (...args) => console.log(...args) // mock | |
function httpRequest(url, method, data) { | |
const init = { method } | |
switch (method) { | |
case 'GET': | |
if (data) url = `${url}?${new URLSearchParams(data)}` | |
break | |
case 'POST': | |
case 'PUT': | |
case 'PATCH': |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"allowJs": true, | |
"checkJs": true, | |
"outDir": "docs", | |
"sourceMap": true, | |
"target": "ES6", | |
"noImplicitAny": true, | |
"noImplicitReturns": true, | |
"strict": 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
const button = document.querySelector('button'); | |
let modal; | |
let backdrop; | |
button.addEventListener('click', showModalHandler); | |
function showModalHandler() { | |
if (modal) { | |
return; |
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
<html> | |
<head> | |
<title>${header}</title> | |
<meta name="description" content="${header}"/> | |
</head> | |
<body> | |
${readme_content} | |
<hr> | |
<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
# Title: Directory Listing Plugin for Jekyll | |
# Author: Simon Heimlicher http://simon.heimlicher.com | |
# Description: Display list of pages and directories beneath current directory | |
# Configuration: You can set default title in _config.yml as follows: | |
# directory_listing_title: "Contents: " | |
# directory_listing_prefix: "Contents of " | |
# | |
# Syntax {% directory_listing Title of Listing %} | |
# | |
# Example 1: |
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 randomString(len, charSet) { | |
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
var randomString = ''; | |
for (var i = 0; i < len; i++) { | |
var randomPoz = Math.floor(Math.random() * charSet.length); | |
randomString += charSet.substring(randomPoz,randomPoz+1); | |
} | |
return randomString; | |
} |
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 nickblah/lua:5.3 # debian:stretch with Lua5.3 pre-installed | |
# Components version | |
ENV POSTGRESQL_VERSION 9.6 | |
ENV LF_CORE_VERSION 4.0.0 | |
ENV MOONBRIDGE_VERSION 1.0.1 | |
ENV WEBMCP_VERSION 2.1.0 | |
ENV PGLATLON_VERSION 0.10 | |
# Use baseimage-docker's init system. |
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 debian | |
# Components version | |
ENV LF_CORE_VERSION 3.2.1 | |
ENV LF_FRND_VERSION 3.2.1 | |
ENV MOONBRIDGE_VERSION 1.0.1 | |
ENV WEBMCP_VERSION 2.0.3 | |
# Use baseimage-docker's init system. | |
CMD ["/sbin/my_init"] |
NewerOlder