Skip to content

Instantly share code, notes, and snippets.

jesse snyder steezeburger

Block or report user

Report or block steezeburger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@steezeburger
steezeburger / docker-container-idle.sh
Last active Dec 5, 2018 — forked from ikbear/idle.sh
Docker image entrypoint idle script
View docker-container-idle.sh
#!/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
}
View docker.md

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
View graphiql-queries-mutations.md
{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}}}}}
View data-science-cli-stuff.sh
# 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)
View dispatchAfter.saga.js
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);
});
};
View ui-components.js
const PrimaryBtn = props => (
<Btn {...props} primary />
);
const SecondaryBtn = props => (
<Btn {...props} secondary />
);
const Btn = ({ className, primary, secondary, ...props }) => (
<button
View containsAll.hs
import System.Environment
import Data.List ((\\))
containsAll :: String -> String
containsAll = (['a' .. 'z'] \\)
main = do
(toTest:args) <- getArgs
print $ containsAll toTest
View apiClient.js
import superagent from 'superagent';
import { Promise } from 'bluebird';
import config from '../config';
const methods = ['get', 'post', 'put', 'patch', 'del'];
function formatUrl(path) {
const adjustedPath = path[0] !== '/' ? '/' + path : path;
return config.apiHost + adjustedPath;
}
View braums-counties.json
[{
"id": "16079",
"name": "Shoshone County",
"val": 0
}, {
"id": "33017",
"name": "Strafford County",
"val": 0
}, {
"id": "16073",
@steezeburger
steezeburger / flexbox-helpers.scss
Last active Jun 14, 2019
Flexbox Helper Classes written in SCSS
View flexbox-helpers.scss
/*
* Custom Flexbox Helper Classes
*/
.flex {
display: flex;
&.cell {
flex: 1;
}
&.equal-sizing {
You can’t perform that action at this time.