I hereby claim:
- I am pbredenberg on github.
- I am pbredenberg (https://keybase.io/pbredenberg) on keybase.
- I have a public key ASAjL5GzWlPWVGTlJdoAquobzfDWAdMD6W1RamkG5yLocQo
To claim this, I am signing this object:
| type Callback<T> = () => Promise<T> | |
| export type AsyncQueue<T = void> = { | |
| push: (task: Callback<T>) => Promise<T> | |
| flush: () => Promise<void> | |
| size: number | |
| } | |
| /** | |
| * Ensures that each callback pushed onto the queue is executed in series. |
| #### | |
| # ZSH function to auto-switch to correct Node version | |
| # https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5 | |
| # | |
| # - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does. | |
| # | |
| # - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING. | |
| # | |
| # - Works correctly if your .nvmrc file contains something relaxed/generic, | |
| # like "4" or "v12.0" or "stable". |
| import { Connection, ConnectionManager, ConnectionOptions, createConnection, getConnectionManager } from 'typeorm' | |
| import { inspect } from 'util' | |
| import { SnakeNamingStrategy } from './SnakeNamingStrategy' | |
| import 'envkey' | |
| /** | |
| * Database manager class | |
| */ | |
| export class Database { | |
| private connectionManager: ConnectionManager |
| import { Connection, ConnectionManager, ConnectionOptions, createConnection, getConnectionManager } from 'typeorm' | |
| import { inspect } from 'util' | |
| import { SnakeNamingStrategy } from './SnakeNamingStrategy' | |
| import 'envkey' | |
| /** | |
| * Database manager class | |
| */ | |
| export class Database { | |
| private connectionManager: ConnectionManager |
| import * as lambda from 'aws-lambda' | |
| import connectionOptions from '../db/ConnectionOptions' | |
| import { Connection } from 'typeorm' | |
| import { Database } from '../db' | |
| import { User } from '../entities' | |
| import 'reflect-metadata' | |
| import 'envkey' | |
| exports.api = async (event: lambda.APIGatewayProxyEvent, serverlessContext: lambda.Context) => { | |
| // This enables Lambda function to complete |
| import "reflect-metadata"; | |
| import { APIGatewayEvent, Context } from "aws-lambda"; | |
| import { BaseEntity, Column, Connection, Entity, getConnectionManager, PrimaryColumn } from "typeorm"; | |
| import v4 = require("uuid/v4"); | |
| @Entity() | |
| export class TData extends BaseEntity { | |
| @PrimaryColumn() | |
| public id: string; |
| #!/bin/bash | |
| # Put this in your deployment user's home directory. Make sure nvm is installed for that user. | |
| # Execute this file from the directory where the pm2 app package.json resides. | |
| # Example: ssh user@server "cd /path/to/app/root && /home/user/deploy_pm2_app.sh pm2_app_name" | |
| NVM_DIR=/home/username/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
| ## Run whatever you need to do to prepare for restart: |
| #!/bin/bash | |
| WIFI_INTERFACE=$(networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}') | |
| NETWORK_SSID=YourNetworkSSID | |
| # You can set $NETWORK_PASSWORD in your profile if you don't want to be prompted for it every time. | |
| PASSWORD=$NETWORK_PASSWORD | |
| if [ -z ${PASSWORD+x} ]; then | |
| echo "Give me the password for $NETWORK_SSID immediately!" |
I hereby claim:
To claim this, I am signing this object:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
xcode-select --install
brew install [email protected]