Skip to content

Instantly share code, notes, and snippets.

@nerdcha
Last active April 2, 2020 02:33
Show Gist options
  • Select an option

  • Save nerdcha/3e811ef28d04561f73337e46267a0d5c to your computer and use it in GitHub Desktop.

Select an option

Save nerdcha/3e811ef28d04561f73337e46267a0d5c to your computer and use it in GitHub Desktop.

Revisions

  1. Jamie Hall revised this gist Mar 26, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion delete_tweets.sh
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,4 @@
    # Context: https://jamiehall.cc/2020/03/10/delete-all-your-tweets-with-one-line-of-bash/
    # https://news.ycombinator.com/item?id=22689746

    twurl "/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&max_id=$(twurl '/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&include_rts=1' | jq -c -r '.[] | .id_str' | head -10 | tail -1)&include_rts=1" | jq -c -r '.[] | .id_str' | parallel -j 10 -a - twurl -X POST /1.1/statuses/destroy/{1}.json > /dev/null
    twurl "/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&max_id=$(twurl '/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&include_rts=1' | jq -r '.[9]|.id_str')&include_rts=1" | jq -r '.[]|.id_str' | parallel -j 10 -a - twurl -X POST /1.1/statuses/destroy/{1}.json > /dev/null
  2. Jamie Hall created this gist Mar 26, 2020.
    5 changes: 5 additions & 0 deletions delete_tweets.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash
    # Context: https://jamiehall.cc/2020/03/10/delete-all-your-tweets-with-one-line-of-bash/
    # https://news.ycombinator.com/item?id=22689746

    twurl "/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&max_id=$(twurl '/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&include_rts=1' | jq -c -r '.[] | .id_str' | head -10 | tail -1)&include_rts=1" | jq -c -r '.[] | .id_str' | parallel -j 10 -a - twurl -X POST /1.1/statuses/destroy/{1}.json > /dev/null