Skip to content

Instantly share code, notes, and snippets.

Monica Olinescu monicao

Block or report user

Report or block monicao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.txt
### Keybase proof
I hereby claim:
* I am monicao on github.
* I am mochromatic ( on keybase.
* I have a public key whose fingerprint is 8937 15D3 B7A0 E644 C70A CF66 7AFF 9902 34AA BBDA
To claim this, I am signing this object:
monicao / closureExample.js
Created Sep 8, 2016
W4D3 Breakout Closures
View closureExample.js
* Question: What is the difference between the two ways of declaring functions in JavaScript?
// Declaring a function with var.
monicao /
Created May 20, 2016
Deploying Sinatra to Heroku

It's time to deploy your app! H0Lee S#!T...
-- Khurram Virani, 2014


Localhost is great and all, but at some point you might want to deploy other app to the wild (the internets) for others to be able to use it.

When an app is live, it’s often referred to as the "production" instance/server of your app. Your your local server (on localhost) which only you can use is referred to the "development" instance.

There are many options on how and where to deploy your web app. The simplest approach is to use a Platform as a Service (PaaS). A PaaS abstracts away many of the complexities associated with setting up, configuring and deploying to a machine in the cloud. Heroku is the most popular platform of this kind.

monicao /
Last active Apr 16, 2020
React Lifecycle Cheatsheet

React Component Lifecycle

  • getInitialState
  • getDefaultProps
  • componentWillMount
  • componentDidMount
  • shouldComponentUpdate (Update only)
  • componentWillUpdate (Update only)
  • componentWillReceiveProps (Update only)
  • render
monicao / index.html
Created Nov 7, 2015
Girls Learning Code: Live Code
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Made with Thimble</title>
<link rel="stylesheet" href="style.css">
<h1>Monica's Favourite Animals</h1>
monicao /
Last active Oct 13, 2017
4 Reasons to Learn JavaScript Before CoffeeScript

CoffeeScript was written by Jeremy Ashkenas, a Ruby developer who was fed up with the quirks of JavaScript. It was an instant success in the Ruby community. Many people were tired of having to type === instead of ==, of JavaScript's crappy lexical scoping, of having to jump through hoops to set up even the most simple inheritance structure, of variables leaking into the global scope or having to worry about silly things like hoisting.

This was a time when web user interfaces were becoming more complex and backend developers had to spend more and more time writing JavaScript code. For a long time, coding in JavaScript meant you spent 100% of your time using jQuery. And what an epic mess that was!

At that time many people did not consider JavaScript to be a real programming language, because of it's oddities. So when CoffeeScript came along developers (especially Ruby developers) embraced it as a way to make coding in JavaScript suck less. I was one of those developers. I liked that CoffeeScript automatic

monicao / spec_helper.rb
Created Aug 27, 2014
Sample spec helper
View spec_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
monicao /
Last active Feb 14, 2020
Setting up your own Ruby Dev Environment on a Mac

Setting up the Ruby dev environment on a Mac

Tested on Yosemite. Should work on El Cap. Message me if it doesn't.

Why would I want to do that?

  • You are tired of using vagrant
  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)
  • You want your code to run faster in development
monicao /
Last active May 22, 2017
TDD Lecture Notes

What is TDD?

  • write a test first
  • see it fail
  • write the implementation
  • see the test pass "the red green loop"

How much should you test?

monicao /
Last active Jan 22, 2017
Setting up rails 4 with MiniTest, Fabrication and Guard
# Gemfile
group :development, :test do
  gem 'minitest-rails'
  gem 'fabrication'
You can’t perform that action at this time.