Skip to content

Instantly share code, notes, and snippets.

View santosh-btc's full-sized avatar

Santosh Sharma santosh-btc

  • Japan
View GitHub Profile
@santosh-btc
santosh-btc / RubyUtils.js
Created August 19, 2017 10:50 — forked from AnkurVyas-BTC/RubyUtils.js
Ruby's String Utils: center, rjust, ljust in JS
/*
* 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 )
@santosh-btc
santosh-btc / pinterest_spammer.rb
Created March 10, 2017 18:01 — forked from ericchen/pinterest_spammer.rb
Post to Pinterest using Ruby and Mechanize
# 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