Skip to content

Instantly share code, notes, and snippets.

View steezeburger's full-sized avatar

jesse snyder steezeburger

View GitHub Profile
@steezeburger
steezeburger / splitter.sh
Last active November 10, 2022 09:55
Bash script for splitting large CSV files into 100 lines while keeping the header.
#!/bin/bash
FILENAME=file-to-split.csv
HDR=$(head -1 ${FILENAME})
split -l 100 ${FILENAME} xyz
n=1
for f in xyz*
do
if [[ ${n} -ne 1 ]]; then
echo ${HDR} > part-${n}-${FILENAME}.csv
fi
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 / flexbox-helpers.scss
Last active June 14, 2019 08:18
Flexbox Helper Classes written in SCSS
/*
* Custom Flexbox Helper Classes
*/
.flex {
display: flex;
&.cell {
flex: 1;
}
&.equal-sizing {
@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}}}}}