I hereby claim:
- I am irmiller22 on github.
- I am irmiller22 (https://keybase.io/irmiller22) on keybase.
- I have a public key ASBdnUCb8cI2VfxcL7see4tKrVU_8QnnIoBUm0F6nJhkcwo
To claim this, I am signing this object:
# Set up kubectl aliases | |
if command -v kubectl 1>/dev/null 2>&1; then | |
eval "source <(kubectl completion bash)" | |
alias kgnsi='k config set-context --current --namespace=$(kg ns -o json | jq -r ".items[].metadata.name"| fzf)' | |
test -e "${HOME}/.kubectl_aliases" && source "${HOME}/.kubectl_aliases" | |
fi | |
# Check secrets resources | |
if command -v kubectl 1>/dev/null 2>&1; then | |
function kdecsec() { |
I hereby claim:
To claim this, I am signing this object:
# GREED GAME | |
def score(dice) | |
return 0 if dice == nil | |
score = 0 | |
counts = [0,0,0,0,0,0] | |
dice.each { |roll| counts[roll-1] += 1 if (1..6) === roll } |
does it change the database? | |
where am I going to store that data? | |
what data needs to be stored? | |
name | |
the songs on the mixtape | |
- write my migration | |
how does that effect my models? | |
# require 'Rack' | |
# class YourAppClass | |
# def call(env) | |
# [200, {'Content-Type' => 'text/html'}, ['Hello Rack!']] | |
# end | |
# end | |
# run YourAppClass.new |
def factorial(num) | |
if num <= 1 | |
1 | |
else | |
num * factorial(num-1) | |
end | |
end |
class Song | |
attr_accessor :title, :artist | |
def serialize | |
file_name = self.title.gsub(" ", "_").downcase | |
File.open("#{file_name}.txt", "w+") do |f| | |
f << "#{self.artist.name} - #{self.title}" | |
end | |
end | |
class Dog | |
attr_accessor :name, :food, :breed | |
def bark | |
"Woof!" | |
end | |
def self.bark | |
"Awoo!" | |
end |
class Array | |
def version_sort | |
self.sort_by do |file| | |
file.scan(/\d+|[a-z]*/).map {|e1| e1.to_i} | |
end | |
end | |
end | |
filenames = [ | |
"foo-1.10.2.ext", | |
"foo-1.11.ext", |