Skip to content

Instantly share code, notes, and snippets.

@tehviking
tehviking / fb_scrape.rb
Last active December 17, 2020 23:43 — forked from ashaw/fb_scrape.rb
Fork of fb_scrape to accommodate changes in Ruby 2, native JSON and CSV libs, and insert pictures and links of posts when applicable.
# gem install rest-client
require 'json'
require 'rest_client'
require 'csv'
require 'cgi'
require 'uri'
# To use, get an access token here, by clicking "get access token"
# and checking user.groups in the dialog box
# https://developers.facebook.com/tools/explorer?method=GET&path=209024949216061%2Ffeed
Name Description Due
A task The desscrption of the task dd/mm/yy
More tasks More descriptions of tasks dd/mm/yy
@tehviking
tehviking / go_optional_arg.rb
Last active December 16, 2015 04:48 — forked from jeremywrowe/gist:5373873
Extract into class & methods and add ability to enter argument to specify branch
#!/usr/bin/env ruby
class Go
attr_accessor :branch_input, :branch_list
def initialize
@branch_input = ARGV[0]
end
def initialize_branch_name(&block)
@branch_input ||= begin