Skip to content

Instantly share code, notes, and snippets.

View sajjadmurtaza's full-sized avatar
🎯
Focusing

Sajjad Murtaza sajjadmurtaza

🎯
Focusing
View GitHub Profile
require 'nokogiri'
require 'open-uri'
# Get a Nokogiri::HTML:Document for the page we're interested in...
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove'))
# Do funky things with it using Nokogiri::XML::Node methods...
####
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:dfpvideo="http://api.google.com/dfpvideo">
<channel>
<title>Delta MRSS feed</title>
<description>Published Videos from Vox Media's Volume</description>
<pubDate>Mon, 05 Jun 2017 15:48:14 +0000</pubDate>
<atom:link rel="self" href="https://staging3-volume.voxmedia.com//feed/delta-mrss-feed/index.xml?page=1"/>
<openSearch:totalResults>7</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
@sajjadmurtaza
sajjadmurtaza / basic_router.jsx
Created October 27, 2020 20:02 — forked from siakaramalegos/basic_router.jsx
Basic example of React Router: BrowserRouter, Link, Route, and Switch
// BrowserRouter is the router implementation for HTML5 browsers (vs Native).
// Link is your replacement for anchor tags.
// Route is the conditionally shown component based on matching a path to a URL.
// Switch returns only the first matching route rather than all matching routes.
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';

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.