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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCRhOs8GZnf3ABTukUiFLTsmPxlQMHLt4dd0VIFC0J7OKZnS/YBcIojrMwDWx9Vt05lTm3KK1m7/tBqhb8uWUrKZ1v5Upmbq5+f6+uMFwcexezJaKDtPNnaN6yKoPIA5Jp+qC5xFhK95Uq+4fSXMoccUf/9IVbz6pEx6odglbYHS5ftMhMChGWrr7Va7UWhRo+0lEPLZgGVU/Fjq47FuLv3OPH1DEecOysmwuWDQitnZZuNAl2bnZiN73cboO3BqHOrHCu6pRL7VStShUVuJmG7PCLIXwNxFkJwgu1gEspWxt+rSWOLhrMAX6+9p0D1N7z6VLHDQBlbrO3p2HUKvImz [email protected] |
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
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
- fail2ban | |
- ufw | |
- docker.io | |
- docker-compose | |
- unattended-upgrades | |
- git |
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 { NextRequest, NextResponse } from 'next/server'; | |
export async function POST(request: NextRequest, res: NextResponse) { | |
const data = await request.json(); | |
switch (data.level) { | |
case 'error': | |
console.error(data); | |
break; | |
case 'warn': | |
console.warn(data); |
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
// route handler enabling draft mode | |
import { getPageByPath } from "@/lib/api/getPageByPath"; | |
import { defaultLocale } from "@/config/i18n"; | |
import { draftMode } from "next/headers"; | |
import { redirect } from "next/navigation"; | |
export async function GET(request: Request) { | |
const { searchParams } = new URL(request.url); | |
const secret = searchParams.get("secret"); | |
const path = searchParams.get("path"); |
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 { readdirSync } from "fs"; | |
import path from "path"; | |
import { performance } from "perf_hooks"; | |
async function getBlogPosts(path: string) { | |
const postFiles = await readdirSync(path); | |
const posts = postFiles.map((name) => ({ name })); | |
console.log("posts", posts); | |
return posts; |
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
console.log('hello'); |
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
// http://forum.jquery.com/topic/serializeobject | |
// https://github.com/hongymagic/jQuery.serializeObject/blob/master/jquery.serializeObject.js | |
$.fn.serializeObject = function() { | |
var a, o; | |
o = {}; | |
a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== void 0) { |
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
!!! 5 | |
//if lt IE 7 | |
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> | |
//if IE 7 | |
<html class="no-js lt-ie9 lt-ie8" lang="en"> | |
//if IE 8 | |
<html class="no-js lt-ie9" lang="en"> | |
//[if gt IE 8]><! | |
html(class='no-js', lang='en') | |
//<![endif] |