Skip to content

Instantly share code, notes, and snippets.

View urubatan's full-sized avatar

Rodrigo Urubatan Ferreira Jardim urubatan

View GitHub Profile
@emad-elsaid
emad-elsaid / post2fb.rb
Created March 3, 2014 11:37
posting to facebook groups all at once with ruby posting to facebook groups all at once with ruby
#!/usr/bin/env ruby
require 'koala' # gem install koala --no-ri --no-rdoc
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "groups", "photos" when authenticating
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
group_filtering_words = ['ruby']
image_path = 'image.png' #change to your image path
message = 'My Cool image.' # your message
@urubatan
urubatan / gist:1224723
Created September 18, 2011 04:16
VIM function to save the selected range to a file and replace the contents with a pointer to the file. Goot to be used with http://github.com/urubatan/codemerger
function! ExtractText(fileName,first_line,last_line)
let text = getline(a:first_line,a:last_line)
execute ":" . a:first_line . "," . a:last_line . "delete"
execute "normal O{{" . a:fileName . "}}"
return writefile(text, a:fileName)
endfunction
command! -range -nargs=1 Es call ExtractText(<f-args>,<line1>,<line2>)
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')