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
app.localhost { | |
tls internal | |
root * /srv/App/public | |
php_fastcgi App:9000 { | |
root /var/www/public | |
} | |
file_server | |
encode gzip | |
} |
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 is now built into `npx auth add apple`! :tada: | |
// https://github.com/nextauthjs/cli/pull/10 | |
#!/bin/node | |
import { SignJWT } from "jose" | |
import { createPrivateKey } from "crypto" | |
if (process.argv.includes("--help") || process.argv.includes("-h")) { |
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
FROM php:7.4-apache | |
RUN apt-get update | |
RUN apt-get install --yes --force-yes cron g++ gettext libicu-dev openssl libc-client-dev libkrb5-dev libxml2-dev libfreetype6-dev libgd-dev libmcrypt-dev bzip2 libbz2-dev libtidy-dev libcurl4-openssl-dev libz-dev libmemcached-dev libxslt-dev | |
RUN a2enmod rewrite | |
RUN docker-php-ext-install mysqli | |
RUN docker-php-ext-enable mysqli |
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 diacriticsMap = { | |
a: 'a', | |
A: 'A', | |
ₐ: 'a', | |
á: 'a', | |
Á: 'A', | |
à: 'a', | |
À: 'A', | |
ă: 'a', | |
Ă: 'A', |
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
<x-layout> | |
<x-section> | |
<x-tabs active="First"> | |
<x-tab name="First"> | |
First content goes here. | |
</x-tab> | |
<x-tab name="Second"> | |
Second content goes here. | |
</x-tab> |
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
class BetterMap<k, v> extends Map<k, v> { | |
update(key:k, updater: (v:v, k:k) => v, notset:v = undefined) { | |
if(this.has(key)) this.set(key, updater(this.get(key), key)) | |
else this.set(key, notset) | |
} | |
filter(predicate: (v:v, k:k) => boolean) { | |
const newMap = new BetterMap<k, v>() | |
const entries = Array.from(this.entries()) | |
for(const [key, value] of entries) { |
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
namespace MyDotNetCore.App | |
{ | |
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore; | |
public class ApplicationDbContext : IdentityDbContext | |
{ | |
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) | |
: base(options) | |
{ | |
} |
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
## Find Available Target Editions | |
DISM.exe /Online /Get-TargetEditions | |
## Convert Server Standard 2019 Evaluation to Server Standard 2019 | |
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula | |
## How To Activate | |
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX | |
slmgr /skms [server]:[port] | |
slmgr /ato |
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
// util function to convert the input to string type | |
function convertToString(input) { | |
if(input) { | |
if(typeof input === "string") { | |
return input; | |
} | |
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
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class JsonMiddleware | |
{ | |
public function handle(Request $request, Closure $next) |
NewerOlder