Skip to content

Instantly share code, notes, and snippets.

View ootoovak's full-sized avatar

Juna Ootoovak ootoovak

View GitHub Profile
Verifying that "" is my Blockstack ID.
ootoovak / 0_reuse_code.js
Created May 21, 2017 22:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
ootoovak /
Last active September 16, 2015 00:35 — forked from staltz/
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

ootoovak /
Last active August 29, 2015 14:15
Starter Git Ignore files (rename to .gitignore and add to the root of your project directory).
ootoovak /
Last active July 23, 2021 05:56
Ruby Array, Hash, and Enumerable to start with

Ruby Array, Hash, and Enumerable methods

What is this?

This is a list of methods from Ruby's Array, Hash, and Enumerable that I find useful and have used a lot. It is by no means an complete list so just think of it as a starting point. (BTW, Enumerable is a mixin and not a class but both Array and Hash include it they both have Enumerable methods avaliable to them.)

In preperation for this week and the upcoming week make sure you are understand how to sort and filter each of these data structures. Read the documentation on these methods and play with them in IRB.

require 'pry'
require 'pry-byebug'
def get_even_numbers_from_zero_to(number)
numbers = []
(0..9).each do |number|
numbers << number if (number % 2 == 0)
ootoovak /
Last active December 23, 2015 23:09
Essential Internet Tools: Protect yourself from the horrors of the internet.
ootoovak / capybara cheat sheet.rb
Last active December 19, 2015 17:19 — forked from zhengjia/capybara cheat sheet
Capybara Cheat Sheet
# Navigating
# Clicking links and buttons
click_link('Link Text')
ootoovak / Learn Rails And Ruby
Last active December 19, 2015 17:18
Learn Rails And Ruby
ootoovak / Problem.rb
Last active December 18, 2015 16:29
Don't recreate another object if you don't need to.
# Want to pass in a hash or instance of object. Was hoping to avoid is_a? or creating a new object but
# think that can only be done with is_a? or overriding new. Also, I might be missing the point as
# avoiding is_a? should mean I am using Duck Typing but if I'm using Duck Typing then I shouldn't be
# checking object equality anyway. See RSpec test for details.
describe MyClass do
let(:hash) { { name: 'Duck Type', description: 'Quacks like a duck?' } }
before do
@my_instance_1 =