This file contains 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
# Usage example: | |
# | |
# s = PinterestSpammer.new | |
# s.sign_in 'your_account_email', 'your_account_password' | |
# s.get_boards # get boards list, that contains board_id (for example - 455708124733779520) | |
# s.create_pin(455708124733779520, 'https://xyz.xyz/', 'http://rubyonrails.org/images/rails.png', 'Spammer!') | |
# | |
# | |
require 'mechanize' | |
class PinterestSpammer |
This file contains 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
/* | |
* Ruby's String#center, String#rjust, String#ljust | |
* | |
* https://jsfiddle.net/6v0bpffm/ | |
*/ | |
function ljust( string, width, padding ) { | |
padding = padding || " "; | |
padding = padding.substr( 0, 1 ); | |
if ( string.length < width ) |