Skip to content

Instantly share code, notes, and snippets.

View steezeburger's full-sized avatar

jesse snyder steezeburger

View GitHub Profile
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
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:
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
# 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;
@steezeburger
steezeburger / docker-container-idle.sh
Last active December 5, 2018 18:25 — forked from ikbear/idle.sh
Docker image entrypoint idle script
#!/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
}

Docker Lunch n Learn - Matthew Johnson 4/25/2018

Notes

  • 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
{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}}}}}
# 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)
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);
});
};