Skip to content

Instantly share code, notes, and snippets.

View gregz67's full-sized avatar

Greg Ziebold gregz67

View GitHub Profile
@gregz67
gregz67 / skittles.js
Created November 12, 2015 18:00
HackerRank quiz
/**
We need to deliver a package of Skittles bags. You will be given an inventory of small bags (1 kilo each) and big bags
(5 kilos each) along with the goal amount of kilos we need to ship the customer. Return the amount of small bags the package
will contain assuming we always use big bags first. Return -1 if it cannot be done.
Input
small (type: int) - The number of small bags we have to work with
big (type: int) - The number of big bags we have to work with
goal (type: int) - The goal weight of the package that we need to ship out
@gregz67
gregz67 / gist:018d534fa1bedb1f8f94
Created May 11, 2015 22:45
Simple cf deploy script
#!/bin/bash
set -e
cf push customer_portal
SHA=`git log --pretty=format:'%h' -n 1`
NOW=`date +"%Y-%m-%d-%H-%M"`
TAGNAME=`echo $NOW-Review-$SHA`
git tag -a $TAGNAME -m "$NOW"
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owGbwMvMwMRow7h5BeuGgmjG0wdeJTGEBjCYVSsl5adUKllVKyXnZKbmlYBYeYm5
qUpWStmplUmJxal6mfkKefkpqXpZxQpQNTpKZalFxZn5eUBVBnrmehZKtTog5SDN
aZl56alFBUWZILOUTIzSLCxNzQwMEg0NEk1S0pIsTNMMDc1SLVNTk0zMjEyTLEEs
wxSgkRn5xSUotiqBzYzPTAGKWrq6OoHUO1mCWIYuQLlSsESSiYmxSVKyuVliqnmS
qWWycaKBhaGliaWJsZmpUYqhJUhhcWoR1EvpRanpVWbmIOcCBcsyk1OR/JueWZJR
moRTQ0llAUikPDUpHqo3PikzLwXoXeTwMASqTC7JBGk2NDE2NDYwM7I00VFKrSjI
LEqNzwSpMDU3szAAAh2lgqLUMiWrvNKcHJB7CvPygbJAixLTgfYUZ6bnJZaUFqUq
@gregz67
gregz67 / gist:1c9b3ba8ecc63ce9f00c
Created May 5, 2014 20:49
Programming Club functions challenge
__author__ = 'gregz'
# Crazy Name generator
# Write a function that takes two words and a number as parameters and
# outputs them all put together (called concatenated) with the following rules:
# 1. Capitalize the first letter of each word
# 2. Use a dictionary to translate:
# a -> @
# i -> !
# o -> 0
@gregz67
gregz67 / gist:00bf29d9611b3298c361
Last active August 29, 2015 14:01
Programming Club dictionary challenge
__author__ = 'gregz'
# 1. Create a dictionary of three or more of your Minecraft friends.
# The key should be their first name, the value should be their Minecraft login.
# 2. Input a friends name.
# * if the name is in the dictionary, print their Minecraft login.
# * if the name is not in the dictionary
# * print a message saying that name is not in the dictionary
# * input their Minecraft login