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:
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
This is in response to your question about initializing a new instance of a class, and correspondingly passing in parameters that are initialized with the class. Let's take an example below:
class Person
def initialize(name)
@name = name
end
end
f
)f
, the form builder elementform_for(@cat)
, then the form field params would look like cat[name]
, cat[color]
, etcresources :cats
)# Kickstarter Project Scrape | |
require 'nokogiri' | |
# HTML, XML parser that allows us to view HTML code as series of nodes; able to highlight elements via CSS selectors | |
require 'open-uri' | |
# Module that allows you to make http request, and returns us the HTML content of a URL via the `open` command | |
require 'pry' | |
# projects | |
# kickstarter.css("li.project.grid_4") |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
require 'nokogiri' | |
require 'open-uri' | |
require 'pry' | |
class Scraper | |
def initialize | |
@student_data = [] | |
@index_url = "http://students.flatironschool.com/" | |
@index = Nokogiri::HTML(open(@index_url)) |