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
| #! /bin/bash | |
| set -x | |
| set -e | |
| # generate your token from https://github.com/settings/tokens and save it into gist-token.txt | |
| token=$(cat gist-token.txt) | |
| function cloneOrPull() { | |
| page=$1 | |
| curl -L \ | |
| -H "Accept: application/vnd.github+json" \ |
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
| #!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
| # syntax = docker/dockerfile:1.4.0 | |
| FROM node:20 | |
| WORKDIR /root | |
| RUN npm install sqlite3 |
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
| require "formula" | |
| require_relative "lib/private_strategy" | |
| class Hoge < Formula | |
| homepage "https://github.com/yourcompany/hoge" | |
| url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy | |
| sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX" | |
| head "https://github.com/yourcompany/hoge.git" | |
| version "0.1.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
| const replace = require('@rollup/plugin-replace'); | |
| const envKeys = () => { | |
| const envRaw = require('dotenv').config().parsed || {}; | |
| return Object.keys(envRaw).reduce( | |
| (envValues, envValue) => ({ ...envValues, [`process.env.${envValue}`]: JSON.stringify(envRaw[envValue]) }), | |
| {} | |
| ); | |
| }; |
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 Vue from 'vue' | |
| import { Route } from 'vue-router' | |
| import { Store } from 'vuex' | |
| import { MetaInfo } from 'vue-meta' | |
| import { AxiosInstance } from 'axios' | |
| interface NuxtContext { | |
| isClient: boolean | |
| isServer: boolean | |
| isStatic: boolean |
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
| When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok. | |
| ngrok http 8080 -host-header="localhost:8080" | |
| ngrok http --host-header=rewrite 8080 |
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
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: frp | |
| --- | |
| apiVersion: v1 | |
| kind: LimitRange | |
| metadata: |
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
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 ExpressValidator = require('express-validator'); | |
| export class HttpError extends Error { | |
| constructor(public code: number, message: string) { | |
| super(message); | |
| Object.setPrototypeOf(this, HttpError.prototype); | |
| } | |
| } | |
| export class RequestValidationError extends Error { |
NewerOlder
