$ diff /etc/ssh/ssh_config /etc/ssh/ssh_config.org
Result:
21c21
< # SendEnv LANG LC_*
---
> SendEnv LANG LC_*
$ cat ./itunes.xml | perl ./itunes.pl
$ perl --version
This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2013, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
*/10 * * * * perl -le 'sleep rand 540' && head -$[${RANDOM} \% `wc -l < /Users/username/lines.txt` + 1] /Users/username/lines.txt | tail -1 | ruby /Users/username/lines.rb
require 'json'
require 'oauth'
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
consumer = OAuth::Consumer.new(
consumer_key,
consumer_secret,
site:'https://api.twitter.com/'
)
endpoint = OAuth::AccessToken.new(consumer, access_token, access_token_secret)
# STATUS
status = STDIN.gets
# POST
response = endpoint.post('https://api.twitter.com/1.1/statuses/update.json', status: status )
result = JSON.parse(response.body)