Skip to content

Instantly share code, notes, and snippets.

View psahni's full-sized avatar

Prashant psahni

View GitHub Profile
@psahni
psahni / job_responsibilities.md
Last active March 23, 2023 05:36
GL_full_Stack_arch_job_desc.md

Job Responsibilities:

Cloud Architecture and Design and Development (50%)

  • Demonstrate knowledge of cloud architecture and implementation features (OS, multi-tenancy, virtualization, orchestration, elastic scalability)
  • Demonstrate knowledge of DevOps tool chains and processes
  • Act as a Subject Matter Expert to the organization for end-to-end architecture, networking, provisioning, and management
  • Demonstrate leadership ability to back decisions with research and the “why,” and articulate several options, the pros and cons for each, and a recommendation
  • Maintain overall industry knowledge on latest trends, technology, etc.
@psahni
psahni / regex.md
Last active August 23, 2023 09:52
regex
irb(main):043:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1:')
=> "342:4"
irb(main):044:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\2:')
=> ":4"
irb(main):045:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1:')
=> "342:4"
irb(main):046:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1,')
=> "342,4"
irb(main):047:0> "prashant".gsub!(/(\w{3})/, '\\1,')
@psahni
psahni / aws.md
Last active August 22, 2022 13:24
Aws

Elastic beantalk

  • Way to deploy your code
  • Database
  • Logic
  • Callbacks
  • accepts_nested_attributes
  • Transaction Movie Rating -> ratings_sum
  • Importmaps
  • Rails initliazation
  • Gem creation
  • Algo
@psahni
psahni / Js_questions.md
Created May 16, 2022 10:48
Javascript Questions

JS inheritence example

function Rectangle(x, y) {
  this.x = x;
  this.y = y;
}

Rectangle.prototype.perimeter = function() {
  return 2 * (this.x + this.y);
@psahni
psahni / rack.rb.md
Last active February 3, 2022 08:50
Rack
class HelloWorld
  def call(env)
    [200, {"Content-Type" => "text/plain"}, ["Hello world!"]]
  end
end
  • You’ve just seen the most simple Rack application.
  • Rack is a beautiful thing, it provides a standardised interface for a web server to interact with a web application. This might seem a fairly simple thing, but it gives us a lot of power. One of the things it enables is Rack Middleware which is a filter that can be used to intercept a request and alter the response as a request is made to an application.
@psahni
psahni / ruby_learnigs_2022.rb
Last active February 3, 2022 09:20
New Ruby Learnings
public def each1
for element in self do
yield(element + "sss")
end
end
['Prashant', "Ankur", "Sachin"].each1 do |ele|
print ele, '**'
end