Skip to content

Instantly share code, notes, and snippets.

View trentmurray's full-sized avatar

Trent trentmurray

View GitHub Profile
@trentmurray
trentmurray / api-calls.ts
Created May 1, 2020 06:22
API calls in typescript
import {AxiosError} from "axios";
export interface Request<DataType = {}> {
endpoint: string;
params?: object;
data?: DataType;
headers?: object;
withCredentials?: boolean;
ownAPI?: boolean;
}
@trentmurray
trentmurray / localproject.sh
Last active March 16, 2020 06:43
Project skeleton automation
#!/bin/zsh
# You should use lowercase, all one word project names
PROJECT=${1}
PROJECTS_DIR="${HOME}/projects"
# If your base projects directory doesn't exist, create it.
if [ ! -d ${PROJECTS_DIR} ]; then
echo "Creating ${PROJECTS_DIR}..."
mkdir -p ${PROJECTS_DIR}
@trentmurray
trentmurray / dc.sh
Last active March 16, 2020 05:43
Our docker-machine install command
#!/bin/zsh
docker-machine create --driver=virtualbox ${1}