Skip to content

Instantly share code, notes, and snippets.

View bliaxiong's full-sized avatar
🎯
Focusing

bxio bliaxiong

🎯
Focusing
View GitHub Profile
@bliaxiong
bliaxiong / www.youtube.com.js
Created January 10, 2021 16:33
Youtube userscript to block ads in videos
const observer = new MutationObserver(mutations => {
for(const mutation of mutations) {
for(const addedNode of mutation.addedNodes) {
if(addedNode.tagName === "VIDEO") {
const video = addedNode
video.addEventListener("timeupdate", () => {
const adSkipButton = document.querySelector(".ytp-ad-skip-button-slot button,.ytp-ad-overlay-close-button")
if(adSkipButton) {
adSkipButton.click()
}

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")