{query {allPeople}}
# If you try to run the above, Graphiql will expand it to:
{query {allPeople {edges {node {id}}}}}
# Navigating the help from: query → Person shows the full set of fields you can
# ask about each person. Tweak the above to:
{query {allPeople {edges {node {id firstName fullName}}}}}
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 PrimaryBtn = props => ( | |
<Btn {...props} primary /> | |
); | |
const SecondaryBtn = props => ( | |
<Btn {...props} secondary /> | |
); | |
const Btn = ({ className, primary, secondary, ...props }) => ( | |
<button |
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 { takeEvery } from 'redux-saga'; // works w/ deprecation warning | |
// import { takeEvery } from 'redux-saga/effects'; // proper according to docs but does not work | |
export const dispatchAfter = (actions, secondAction) => function*() { | |
yield* takeEvery(actions, function* (action) { | |
yield secondAction(action); | |
}); | |
}; |
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
# python stuff needed for csvkit (may already be installed) | |
sudo apt-get install python-dev python-pip python-setuptools build-essential | |
# install pip | |
sudo apt-get install python-pip | |
# csvkit (badass csv tools) | |
pip install csvkit | |
# jq (json tool) |
docker build -t name .
- builds container from image with name
- looks at Dockerfile
docker run
,docker run -it -p 3200:80 -e ENV=QA legacy
- looks at Dockerfile
-it
interactive terminal, -p port, -e env variables
- starts container created from
docker build
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
#!/bin/bash | |
echo "This is a idle script (infinite loop) to keep container running." | |
echo "Please replace this script." | |
cleanup () | |
{ | |
kill -s SIGTERM $! | |
exit 0 | |
} |
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
# for loop to rename files with `mv`. uses `basename` to get filename stripped of path and suffix. | |
for f in *.csv.bu; do mv $f `basename $f .csv.bu`.csv; done; |
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
extends KinematicBody | |
var speed = 7 | |
const ACCEL_DEFAULT = 10 | |
const ACCEL_AIR = 1 | |
onready var accel = ACCEL_DEFAULT | |
var gravity = 9.8 | |
var jump = 5 | |
var cam_accel = 40 |
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
from random import randint | |
hands = ['rock', 'scissors', 'paper'] | |
judgements = ['It is a draw.', 'You lost to a computer!', 'You win I guess.'] | |
while True: | |
try: | |
user_input = input('Your weapon of choice: ') | |
user_choice_index = hands.index(user_input.lower()) | |
except ValueError: |
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
extends KinematicBody | |
""" | |
This file contains properties and functionality for a 3rd person player character. | |
Movement and mouse capture copied from: | |
https://www.youtube.com/watch?v=dcCzKHTxflo&list=PL_sLeUIth9Dp_VymeT0CpScopbg5ktoSk | |
""" | |
export var walking_speed = 10 |