jonz94@jonzWin11WS:~$ uname --help
Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
-a, --all print all information, in the following order,
except omit -p and -i if unknown:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
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
// src/server/auth.ts | |
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | |
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ | |
import { DrizzleAdapter } from '@auth/drizzle-adapter' | |
import { getServerSession, type DefaultSession, type NextAuthOptions } from 'next-auth' | |
import { type Adapter } from 'next-auth/adapters' | |
import { env } from '~/env' | |
import { db } from '~/server/db' |
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 { Device } from '@capacitor/device'; | |
import { isPlatform } from '@ionic/angular'; | |
const hasDynamicIsland = async () => { | |
if (!isPlatform('iphone')) { | |
return false; | |
} | |
const { model: identifier } = await Device.getInfo(); |
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
$historyPath = (Get-PSReadLineOption).HistorySavePath | |
$directory = (Get-Item $historyPath).DirectoryName | |
$basename = (Get-Item $historyPath).Basename | |
$extension = (Get-Item $historyPath).Extension | |
$timestamp = (Get-Date).ToString("yyyy-MM-ddTHH-mm-ssZ") | |
$backupPath = "$directory\$basename-$timestamp-backup$extension" | |
Copy-Item $historyPath $backupPath |
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 { PDFDocument } from 'pdf-lib'; | |
async mergeMultiplgePdf(base64Pdfs: string[]): Promise<File> { | |
const pdfDoc = await PDFDocument.create(); | |
for (base64Pdf of base64Pdfs) { | |
const url = `data:application/pdf;base64,${base64Pdf}`; | |
const donorPdfBytes = await fetch(url).then((res) => res.arrayBuffer()); | |
const donorPdfDoc = await PDFDocument.load(donorPdfBytes); |
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
<# | |
.SYNOPSIS | |
Updates manifests and pushes them or creates pull-requests. | |
.DESCRIPTION | |
Updates manifests and pushes them directly to the master branch or creates pull-requests for upstream. | |
.PARAMETER Upstream | |
Upstream repository with the target branch. | |
Must be in format '<user>/<repo>:<branch>' | |
.PARAMETER App | |
Manifest name to search. |
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
#!/bin/sh | |
set -e | |
# available styles: "fixed", "fixed-slab", "mono", "mono-slab", "term", "term-slab", "gothic", "ui" | |
style="mono" | |
# available orthographies: "cl", "hc", "j", "k", "sc", "tc" | |
orthography="tc" |
GitHub REST API does have an api to get all the tags of a repo, and does have an api to get the latest release of a repo, but does not have one to get the latest tag 😔
😎 Use https://shields.io as the API!
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
// disable on these sites | |
const sites = [ | |
/en.key-test.ru/, | |
/github.com/, | |
/hey.com/, | |
/mail.protonmail.com/, | |
/monkeytype.com/, | |
/ssh.cloud.google.com/, | |
/tetr.io/, | |
/twitter.com/, |
NewerOlder