Skip to content

Instantly share code, notes, and snippets.

View grantvanhorn's full-sized avatar
🧹

Grant Van Horn grantvanhorn

🧹
View GitHub Profile
npm install -g create-react-app
create-react-app my-app
cd my-app/
npm start
server {
listen 80;
server_name dicktuna.com;
root /path/to/build;
index index.html index.htm;
location / {
}
}
type BudgetUser {
createdAt: DateTime!
id: ID! @inUnique
name: String! @isUnique
updatedAt: DateTime!
budgets: [Budget!]! @relation(name: "UserBudgets")
}
type Budget {
createdAt: DateTime!
mutation CreateBudgetUser1 {
createBudgetUser(
name: "budgetUserTheFirst") {
id
}
}
mutation CreateBudgetUser2 {
createBudgetUser(
name: "budgetUserTheSecond") {
mutation CreateBudget1 {
createBudget(
allocation: 1000
usersIds: ["cj5ivb8dh0d8a0182w3lv4z0e", "cj5iv6waql85f0130e5qnpqey"]
) {
id
}
}
{
allBudgets {
allocation
users {
id
name
}
}
}
{
"data": {
"allBudgets": [
{
"allocation": 1000,
"users": []
},
{
"allocation": 1000,
"users": []
@grantvanhorn
grantvanhorn / Dockerfile
Created October 18, 2019 01:35
Create React App Dockerfile
## Stage 1 (multi environment base)
# This is our inital setup. The minimum for production while still
# allowing for other stages to build successfully (without production settings)
FROM node:10.16.3-alpine AS base
EXPOSE 3000
ENV NODE_ENV=production
WORKDIR /opt
COPY package*.json ./
RUN npm ci \
@grantvanhorn
grantvanhorn / .hyper.js
Last active April 3, 2022 01:26
.hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// When a new tab is opened, use the user root as the CWD.
preserveCWD: false,
// choose either `'stable'` for receiving highly polished,
@grantvanhorn
grantvanhorn / .zshrc
Created March 27, 2021 21:29
my zsh config
setopt PROMPT_SUBST
autoload -Uz vcs_info
alias updatezsh='source ~/.zshrc'
alias l='colorls --group-directories-first --almost-all'
alias ll='colorls --group-directories-first --almost-all --long'
source $(dirname $(gem which colorls))/tab_complete.sh
## Uses the zsh precmd function hook to set the tab title to the current working directory before each prompt
function precmd() {
window_title="\\033]0;${PWD##*/}\\007"