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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteRule . /index.html [L] |
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
.flex { | |
display : -webkit-box; | |
display : -ms-flexbox; | |
display : flex; | |
} | |
.flex-row { | |
display : -webkit-box; | |
display : -ms-flexbox; |
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
#!/usr/bin/env bash | |
dlurl=https://dl.pstmn.io/download/latest/linux64 | |
wget $dlurl -O postman.tar.gz | |
sudo tar -xzf postman.tar.gz -C /opt | |
rm postman.tar.gz | |
sudo ln -s /opt/Postman/Postman /usr/bin/postman | |
sudo cat > /usr/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 |
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
export async function wrapErr<T>(p: Promise<T>): Promise<[any, T | undefined]> { | |
try { | |
return [undefined, await p]; | |
} catch (err) { | |
return [err, undefined]; | |
} | |
} | |
let [err, value] = await wrapErr(somePromiseFunc()); | |
if (err) { |
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 path = require('path') | |
const webpack = require('webpack') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') | |
const extractStyles = new ExtractTextPlugin({ | |
filename: "css/[name].css" | |
}) |
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 { EventEmitter } from "events" | |
export class WaitGroup extends EventEmitter { | |
public state: number | |
constructor(initialState: number = 0) { | |
if (initialState < 0) { | |
throw new RangeError() | |
} | |
super() |
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
sudo cryptsetup luksOpen /dev/nvme0n1p3 cryptdata | |
sudo lvscan | |
sudo vgchange -ay | |
sudo mount /dev/mapper/data-root /mnt | |
sudo mount /dev/nvme0n1p1 /mnt/boot/efi | |
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done | |
sudo cp /etc/resolv.conf /mnt/etc/ | |
sudo chroot /mnt |
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
export class WrappedError<ErrKind = any> extends Error implements Iterable<WrappedError | ErrKind> { | |
previous: ErrKind | null = null; | |
guid: Guid; | |
constructor(message: string, previous?: ErrKind) { | |
super(message); | |
// We update the error's name to distinguish it from the base Error. | |
this.name = this.constructor.name; | |
this.guid = `<${this.name}:empty>`; | |
// We add our reference to the original error value (if provided). |
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
/** | |
* Creates a mapped type from the `Subject` | |
* that excludes all members with types | |
* that extend the `ExcludeType`. | |
*/ | |
type ExcludeBy<Subject, ExcludeType> = { | |
[P in { | |
[K in keyof Subject]: Subject[K] extends ExcludeType ? never : K | |
}[keyof Subject]]: Subject[P] | |
}; |
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
Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767 | |
HDMI-0 disconnected (normal left inverted right x axis y axis) | |
DP-0 disconnected (normal left inverted right x axis y axis) | |
DP-1 disconnected (normal left inverted right x axis y axis) | |
DP-2 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm | |
3840x2160 60.00*+ 29.98 | |
2560x1440 59.95 | |
1920x1200 59.88 | |
1920x1080 60.00 59.94 50.00 23.98 | |
1680x1050 59.95 |
NewerOlder