Skip to content

Instantly share code, notes, and snippets.


Subrat Rout subratrout

View GitHub Profile
subratrout /
Created Apr 25, 2021 — forked from milmazz/
Useful links found in The Imposter's Handbook by Rob Conery
subratrout / caesar.rb
Created Apr 16, 2021 — forked from matugm/caesar.rb
Caesar cipher using Ruby
View caesar.rb
def caesar_cipher(string)
shiftyArray = []
charLine =
shift = 1
ALPHABET_SIZE.times do |shift|
shiftyArray << do |c|
((c + shift) < 123 ? (c + shift) : (c + shift) - 26).chr
subratrout /
Created Apr 15, 2021 — forked from jamesyang124/
Ruby meta programming

#!/bin/ruby --verion => 2.0.0-p353


In Ruby, self is a special variable that always references the current object.

  • Inside class or module definition, self refer to the Class or Module object.
  • Inside instance method, self refer to future instance object.
  • Inside class method, self refer to the class.i
subratrout /
Created Jul 24, 2020 — forked from thegitfather/
Vanilla JavaScript Quick Reference / Cheatsheet
subratrout /
Created Mar 29, 2020 — forked from bradtraversy/
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

subratrout /
Created Apr 18, 2018 — forked from jasonrudolph/
Programming Achievements: How to Level Up as a Developer

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.


JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and




  • ✏️ method changes this.
  • 🔒 method does not change this.


  • concat(...items: Array<T[] | T>: T[] 🔒 ES3


Here are my goals that I would like to accomplish over the next year.

Goal #1 - Become proficient in JavaScript and its ecosystem

  • Currently, I have a decent grasp over the language. There are still some ES5 methods I am not familiar with and ES6 is hit or miss with what I know. The JS ecosystem is still something I'm getting used to (npm) and using a tool like webpack is still tough to wrap my head about.
  • Success would be fully understanding all the little quirks of JS and keeping up with the latest version of the language. Being able to structure modern client side applications using webpack and taking advantage of npm. Also, I would like to become fairly proficient with building out API's with Node.
  • Resources for learning: