This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'mechanize' | |
| require 'yaml' | |
| $results = [] | |
| def find(a, link) | |
| puts "find started on #{link}" | |
| a.get link do |page| | |
| page.search(:css, ".blog-post").each do |post| | |
| h2 = post.search(:css, "h2").first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'activesupport' | |
| require 'bad_ass_extensions' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'date' | |
| class GitHubber | |
| attr_accessor :header, :name, :date, :date_string, :links, :post |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # From http://www.reddit.com/r/linux/comments/akt3j/a_functional_programming_style_map_function_for/ | |
| # Modified to work in zsh. | |
| function map() { | |
| local command i rep | |
| if [ $# -lt 2 ] || [[ ! "$@" =~ :[[:space:]] ]];then | |
| echo "Invalid syntax." >&2; return 1 | |
| fi | |
| until [[ $1 =~ : ]]; do | |
| command="$command $1"; shift | |
| done |
NewerOlder