Skip to content

Instantly share code, notes, and snippets.

View ltrainpr's full-sized avatar

Lionel E. Ramos ltrainpr

View GitHub Profile
@ltrainpr
ltrainpr / software_to_data_engineer.md
Last active July 8, 2023 21:22
From Software to Data Engineer

Data Engineer's Responsibilities (not all encompassing):

  • Building data platforms
  • Define data architecture and data modeling
  • Handle data in various formats
  • Create ETL or ELT pipelines as well as streaming data pipelines
  • Schedule and deploy pipelines
  • Build frameworks or code for data management activities
  • Make data accessible with right governance in place
  • Enable self service access to data
@ltrainpr
ltrainpr / js_grids.md
Created March 16, 2015 17:25
JavaScript Grids

// A multi-dimensional array (AKA a Matrix, Agent Lionel) // The top-level array is the the rows, each row is made up of columns grid = [[" "," "] [" "," "]];

// A multi-dimensional object // Key of the top level object is the "y", // Keys of the sub-object are the "x", // Values of the sub-object are the value of the coordinate grid = { 0: { 0: " ", 1: " " },

@ltrainpr
ltrainpr / roman_numerals.js
Created December 5, 2013 05:20
Roman Numerals using and not using OOJS
function toRoman(n) {
var r = '',
decimals = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
roman = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'];
for (var i = 0; i < decimals.length; i++) {
while (n >= decimals[i]) {
r += roman[i];
n -= decimals[i];
}
}
@ltrainpr
ltrainpr / brie.rb
Last active December 29, 2015 12:19
Gilded Rose Kata
class Brie
def initialize(args)
@name = args[:name]
@quality = args[:quality]
@sellin = args[:sell_in]
end
def day_passes
brie_quality_increase
end

Solution for Challenge: Research: View and Form Helpers. Started 2013-10-05T19:23:49+00:00

link_to

link_to is a rails helper that helps generate html link tags in views and controllers. link_to "relies on" (whatever that means) url_for - a similar (but different) helper that generates links in views and controllers. From the [ActionView docs] (http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to):

link_to(name = nil, options = nil, html_options = nil, &block)

Creates a link tag of the given name using a URL created by the set of options.

=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')
@ltrainpr
ltrainpr / gist:6187461
Created August 8, 2013 18:43
Heroku Logs: Heroku Application Error when opening Rails Tutorial Sample App
2013-08-08T16:51:30.821318+00:00 heroku[run.9125]: Process exited with status 0
2013-08-08T16:51:30.838410+00:00 heroku[run.9125]: State changed from up to complete
2013-08-08T16:52:05.045633+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:05.283192+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:29.661946+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T16:52:29.904570+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=safe-everglades-1070.herokuapp.com fwd="67.190.24.163" dyno= connect= service= status=503 bytes=
2013-08-08T17