Skip to content

Instantly share code, notes, and snippets.

@cduruk
Created February 10, 2018 01:20
Show Gist options
  • Save cduruk/f0c295e683bb9877500658e7b766dec6 to your computer and use it in GitHub Desktop.
Save cduruk/f0c295e683bb9877500658e7b766dec6 to your computer and use it in GitHub Desktop.
An oral history
➜ tw git:(master) ruby delete.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- twitter (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from delete.rb:2:in `<main>'
➜ tw git:(master) rvm
zsh: command not found: rvm
➜ tw git:(master) gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: key 105BD0E739499BDB: "Piotr Kuczynski <[email protected]>" not changed
gpg: key 3804BB82D39DC0E3: 81 signatures not checked due to missing keys
gpg: key 3804BB82D39DC0E3: "Michal Papis (RVM signing) <[email protected]>" not changed
gpg: Total number processed: 2
gpg: unchanged: 2
➜ tw git:(master) \curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc
gpg: Signature made Sun Sep 10 16:59:21 2017 EDT
gpg: using RSA key E206C29FBF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <[email protected]>" [unknown]
gpg: aka "Michal Papis <[email protected]>" [unknown]
gpg: aka "[jpeg image of size 5015]" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/Users/cduruk/.rvm/archives/rvm-1.29.3.tgz'
Installing RVM to /Users/cduruk/.rvm/
Adding rvm PATH line to /Users/cduruk/.profile /Users/cduruk/.mkshrc /Users/cduruk/.bashrc /Users/cduruk/.zshrc.
Adding rvm loading line to /Users/cduruk/.profile /Users/cduruk/.bash_profile /Users/cduruk/.zlogin.
Installation of RVM in /Users/cduruk/.rvm/ is almost complete:
* To start using RVM you need to run `source /Users/cduruk/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
➜ tw git:(master) source /Users/cduruk/.rvm/scripts/rvm
➜ tw git:(master)
➜ tw git:(master)
➜ tw git:(master) rvm
Ruby enVironment Manager 1.29.3 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
For additional documentation please visit https://rvm.io
➜ tw git:(master) rvm
Ruby enVironment Manager 1.29.3 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
For additional documentation please visit https://rvm.io
➜ tw git:(master) rvm install
➜ tw git:(master) ruby delete.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- twitter (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from delete.rb:2:in `<main>'
➜ tw git:(master) rvm install twitter
Unrecognized command line argument: twitter
Run `rvm help` to see usage information
➜ tw git:(master) gem install twitter
Fetching: public_suffix-3.0.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
➜ tw git:(master) rvm install 2.5.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/ruby-2.5.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml - please wait
==> Upgrading 1 outdated package, with result:
[email protected] 1.1.0g_1
==> Upgrading [email protected]
==> Downloading https://homebrew.bintray.com/bottles/[email protected]_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring [email protected]_1.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/[email protected]/certs
and run
/usr/local/opt/[email protected]/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/[email protected]/lib
CPPFLAGS: -I/usr/local/opt/[email protected]/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/[email protected]/lib/pkgconfig
==> Summary
🍺 /usr/local/Cellar/[email protected]/1.1.0g_1: 6,585 files, 15.6MB
Certificates bundle '/usr/local/etc/[email protected]/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/cduruk/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13.3M 100 13.3M 0 0 1247k 0 0:00:10 0:00:10 --:--:-- 2136k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.0 - #extracting ruby-2.5.0 to /Users/cduruk/.rvm/src/ruby-2.5.0 - please wait
ruby-2.5.0 - #configuring - please wait
ruby-2.5.0 - #post-configuration - please wait
ruby-2.5.0 - #compiling - please wait
ruby-2.5.0 - #installing - please wait
ruby-2.5.0 - #making binaries executable - please wait
Installed rubygems 2.7.3 is newer than 2.6.14 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.5.0 - #gemset created /Users/cduruk/.rvm/gems/ruby-2.5.0@global
ruby-2.5.0 - #importing gemset /Users/cduruk/.rvm/gemsets/global.gems - please wait
ruby-2.5.0 - #generating global wrappers - please wait
ruby-2.5.0 - #gemset created /Users/cduruk/.rvm/gems/ruby-2.5.0
ruby-2.5.0 - #importing gemsetfile /Users/cduruk/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.0 - #generating default wrappers - please wait
ruby-2.5.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.5.0 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
➜ tw git:(master) rvm use 2.5.0
Using /Users/cduruk/.rvm/gems/ruby-2.5.0
➜ tw git:(master) gem install twitter
Fetching: public_suffix-3.0.1.gem (100%)
Successfully installed public_suffix-3.0.1
Fetching: addressable-2.5.2.gem (100%)
Successfully installed addressable-2.5.2
Fetching: buftok-0.2.0.gem (100%)
Successfully installed buftok-0.2.0
Fetching: equalizer-0.0.11.gem (100%)
Successfully installed equalizer-0.0.11
Fetching: http_parser.rb-0.6.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Fetching: http-form_data-2.0.0.gem (100%)
Successfully installed http-form_data-2.0.0
Fetching: unf_ext-0.0.7.5.gem (100%)
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.5
Fetching: unf-0.1.4.gem (100%)
Successfully installed unf-0.1.4
Fetching: domain_name-0.5.20170404.gem (100%)
Successfully installed domain_name-0.5.20170404
Fetching: http-cookie-1.0.3.gem (100%)
Successfully installed http-cookie-1.0.3
Fetching: http-3.0.0.gem (100%)
Successfully installed http-3.0.0
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: memoizable-0.4.2.gem (100%)
Successfully installed memoizable-0.4.2
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: naught-1.1.0.gem (100%)
Successfully installed naught-1.1.0
Fetching: simple_oauth-0.3.1.gem (100%)
Successfully installed simple_oauth-0.3.1
Fetching: twitter-6.2.0.gem (100%)
Successfully installed twitter-6.2.0
Parsing documentation for public_suffix-3.0.1
Installing ri documentation for public_suffix-3.0.1
Parsing documentation for addressable-2.5.2
Installing ri documentation for addressable-2.5.2
Parsing documentation for buftok-0.2.0
Installing ri documentation for buftok-0.2.0
Parsing documentation for equalizer-0.0.11
Installing ri documentation for equalizer-0.0.11
Parsing documentation for http_parser.rb-0.6.0
Installing ri documentation for http_parser.rb-0.6.0
Parsing documentation for http-form_data-2.0.0
Installing ri documentation for http-form_data-2.0.0
Parsing documentation for unf_ext-0.0.7.5
Installing ri documentation for unf_ext-0.0.7.5
Parsing documentation for unf-0.1.4
Installing ri documentation for unf-0.1.4
Parsing documentation for domain_name-0.5.20170404
Installing ri documentation for domain_name-0.5.20170404
Parsing documentation for http-cookie-1.0.3
Installing ri documentation for http-cookie-1.0.3
Parsing documentation for http-3.0.0
Installing ri documentation for http-3.0.0
Parsing documentation for thread_safe-0.3.6
Installing ri documentation for thread_safe-0.3.6
Parsing documentation for memoizable-0.4.2
Installing ri documentation for memoizable-0.4.2
invalid options: -SHN
(invalid options are ignored)
Parsing documentation for multipart-post-2.0.0
Installing ri documentation for multipart-post-2.0.0
Parsing documentation for naught-1.1.0
Installing ri documentation for naught-1.1.0
Parsing documentation for simple_oauth-0.3.1
Installing ri documentation for simple_oauth-0.3.1
Parsing documentation for twitter-6.2.0
Installing ri documentation for twitter-6.2.0
Done installing documentation for public_suffix, addressable, buftok, equalizer, http_parser.rb, http-form_data, unf_ext, unf, domain_name, http-cookie, http, thread_safe, memoizable, multipart-post, naught, simple_oauth, twitter after 6 seconds
17 gems installed
➜ tw git:(master) gem install json
Fetching: json-2.1.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed json-2.1.0
Parsing documentation for json-2.1.0
Installing ri documentation for json-2.1.0
Done installing documentation for json after 0 seconds
1 gem installed
➜ tw git:(master) ruby delete.rb
What's that sound...?
Got 199 more tweets, latest is 706570634512486400
Got 198 more tweets, latest is 427560032167682048
Got 200 more tweets, latest is 348575149353758720
Got 198 more tweets, latest is 132759061757308928
Got 200 more tweets, latest is 1128689986
Got 170 more tweets, latest is 693406562
Got 1165 tweets total
Deleting a tweet 17 days old
#<Twitter::Error::Forbidden: You may not delete another user's status.>
Error deleting 955866135408332801; exiting
➜ tw git:(master)
➜ tw git:(master)
➜ tw git:(master)
➜ tw git:(master)
➜ tw git:(master)
➜ tw git:(master) ✗
➜ tw git:(master) ✗
➜ tw git:(master) ✗ git add .
➜ tw git:(master) ✗ git commit -m 'Actually me'
[master 3ebed38] Actually me
1 file changed, 1 insertion(+), 1 deletion(-)
➜ tw git:(master) ruby delete.rb
What's that sound...?
Got 200 more tweets, latest is 959325755980181505
Got 200 more tweets, latest is 955624608027340800
Got 200 more tweets, latest is 954206926199578625
Got 200 more tweets, latest is 951694062368804864
Got 200 more tweets, latest is 948251403419389952
Got 200 more tweets, latest is 944694643471523840
Got 199 more tweets, latest is 942213004141015040
Got 199 more tweets, latest is 935593574573359104
Got 200 more tweets, latest is 932870427654754304
Got 199 more tweets, latest is 930314204623421440
Got 200 more tweets, latest is 928043214883274752
Got 200 more tweets, latest is 925758384548192257
Got 200 more tweets, latest is 923298261242232833
Got 200 more tweets, latest is 921890445965246464
Got 199 more tweets, latest is 919357389236662273
Got 200 more tweets, latest is 917169300468776961
Got 200 more tweets, latest is 915254345746178048
Got 200 more tweets, latest is 911676924971311104
Got 200 more tweets, latest is 909846592785596416
Got 200 more tweets, latest is 907657837232324608
Got 200 more tweets, latest is 905139376841035777
Got 198 more tweets, latest is 902058952669577216
Got 200 more tweets, latest is 898698552083267584
Got 200 more tweets, latest is 896179028960268288
Got 200 more tweets, latest is 894061695777165313
Got 199 more tweets, latest is 889947669631688705
Got 200 more tweets, latest is 884943083791503360
Got 199 more tweets, latest is 879089136568750080
Got 199 more tweets, latest is 874496812974882816
Got 198 more tweets, latest is 869342548799627265
Got 200 more tweets, latest is 863635731394174976
Got 199 more tweets, latest is 855162925073420288
Got 200 more tweets, latest is 851196909515558912
Got 199 more tweets, latest is 846036438382653441
Got 199 more tweets, latest is 840253372380856320
Got 200 more tweets, latest is 832373529903456256
Got 200 more tweets, latest is 825028396153401345
Got 200 more tweets, latest is 820491017811939329
Got 145 more tweets, latest is 24125110581
Got 7731 tweets total
Ignored a tweet 0 days old
Me: Let me try to create an app to delete my old tweets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment