<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Al</title>
    <description>The latest articles on Forem by Al (@alhern).</description>
    <link>https://forem.com/alhern</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F11123%2F98453938-243c-4416-8efd-96f13768470d.jpg</url>
      <title>Forem: Al</title>
      <link>https://forem.com/alhern</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/alhern"/>
    <language>en</language>
    <item>
      <title>Delete your Twitter data while it's still free. (so until February 9th 2023)</title>
      <dc:creator>Al</dc:creator>
      <pubDate>Fri, 03 Feb 2023 11:48:31 +0000</pubDate>
      <link>https://forem.com/alhern/delete-your-twitter-data-while-its-still-free-so-until-february-9th-2023-38mb</link>
      <guid>https://forem.com/alhern/delete-your-twitter-data-while-its-still-free-so-until-february-9th-2023-38mb</guid>
      <description>&lt;p&gt;This might be your last chance to easily delete all of your tweets without a hassle. Here's what you gotta do to reduce your digital footprint before Elon revokes free access to the API and therefore destroys a plethora of apps.&lt;/p&gt;

&lt;p&gt;The ways to mass delete your tweets and likes is limited, the free API will only go up to 3200 deleted tweets. If you have thousands of them, &lt;strong&gt;immediately request your twitter archive&lt;/strong&gt;, it will take up to 24 hours for you to get it and download it:&lt;/p&gt;

&lt;p&gt;You have to go there to request it:&lt;br&gt;
&lt;code&gt;Settings and Support &amp;gt; Settings and privacy &amp;gt; Your Account &amp;gt; Download an archive of your data&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also available through this link: &lt;a href="https://twitter.com/settings/download_your_data" rel="noopener noreferrer"&gt;DOWNLOAD YOUR DATA&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, extract your archive cause it's time to start cleaning.&lt;/p&gt;

&lt;p&gt;We will use this great app by Logan Han: &lt;a href="https://github.com/logan-han/twitter-deleter" rel="noopener noreferrer"&gt;https://github.com/logan-han/twitter-deleter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But before that, go to wherever you extracted your twitter archive and rename &lt;code&gt;data/tweets.js&lt;/code&gt; with &lt;code&gt;data/tweet.js&lt;/code&gt;. We need to remove the 's' to use the singular form.&lt;/p&gt;

&lt;p&gt;The reason is that at the time I'm writing this (03 February 2023), the app we're going to use will look for &lt;code&gt;data/tweet.js&lt;/code&gt;, singular form, even though the Twitter archive use the plural form. &lt;/p&gt;

&lt;p&gt;Now open &lt;code&gt;tweet.js&lt;/code&gt; with your favorite editor and edit the first two lines of your file this:&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.YTD.tweets.part0 = [
  {
    "tweet" : {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.YTD.tweets.part0 = [{
  "tweet": {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you're done, save and zip this js file.&lt;/p&gt;

&lt;p&gt;Head to Logan's site, right here: &lt;a href="https://twitter.han.life/" rel="noopener noreferrer"&gt;https://twitter.han.life/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now be aware that the app only supports up to 10MB so if you exceed this weight there is a very easy fix: cut your tweet.js file into multiple parts and simply re-run the app until you've deleted everything. &lt;/p&gt;

&lt;p&gt;One tweet looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "tweet": {
    "edit_info": {
      "initial": {
     ......
    "favorited": false,
    "full_text": "blablabla",
    "lang": "en"
  }
},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It starts with &lt;code&gt;{&lt;/code&gt; followed by &lt;code&gt;"tweet": {&lt;/code&gt; and ends with a bracket followed by a comma: &lt;code&gt;},&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Keep this pattern in mind while removing excess tweets to run the app, make sure in any case that your tweet.js files will always start with this: &lt;code&gt;window.YTD.tweets.part0 = [{&lt;/code&gt; and end with this: &lt;code&gt;]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now let the app run and go do something else, it will delete all of your tweets.&lt;/p&gt;

&lt;p&gt;Now onto the &lt;strong&gt;likes&lt;/strong&gt;...&lt;/p&gt;




&lt;p&gt;Open your browser, go to your likes (&lt;a href="https://twitter.com/%5BYOURACCOUNT%5D/likes" rel="noopener noreferrer"&gt;https://twitter.com/[YOURACCOUNT]/likes&lt;/a&gt;), open the dev console and paste this in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setInterval(() =&amp;gt; {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}
window.scrollTo(0, document.body.scrollHeight)
}, 10000)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use GreaseMonkey for your script and you can find more snippets over here and see what works best for you: &lt;a href="https://gist.github.com/aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d" rel="noopener noreferrer"&gt;https://gist.github.com/aymericbeaumet/d1d6799a1b765c3c8bc0b675b1a1547d&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just keep in mind that you will need to be aware of cooldowns, the API will block you for minutes or hours if do too many requests, the rate limit seems to be of 900 requests every 15 minutes.&lt;/p&gt;

&lt;p&gt;Be wary that there are likes that will persist even if they show up as unliked, you will have to re-like and re-unlike them to get rid of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setInterval(async () =&amp;gt; {
  for (const d of document.querySelectorAll('div[data-testid="like"]')) {
     d.click()
  }

  await new Promise(r =&amp;gt; setTimeout(r, 5000));

  for (const e of document.querySelectorAll('div[data-testid="unlike"]')) {
    e.click()
  }

  window.scrollTo(0, document.body.scrollHeight)
}, 20000)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This snippet by 0xfoobar does this and has greater timeouts between liking and unliking (so the API will not be angry at you).&lt;/p&gt;

&lt;p&gt;Enjoy experimenting and reducing your online footprint!&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>crypto</category>
    </item>
    <item>
      <title>I got an ESP32, now what?</title>
      <dc:creator>Al</dc:creator>
      <pubDate>Sat, 01 Aug 2020 15:23:25 +0000</pubDate>
      <link>https://forem.com/alhern/i-got-an-esp32-now-what-1ej</link>
      <guid>https://forem.com/alhern/i-got-an-esp32-now-what-1ej</guid>
      <description>&lt;p&gt;Now you're going to install Arduino IDE.&lt;/p&gt;

&lt;p&gt;If you already have it installed, you need to go to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;File &amp;gt; Preferences&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;https://dl.espressif.com/dl/package_esp32_index.json&lt;/code&gt; into &lt;code&gt;Additional Board Manager URLS&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;OK&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;Tools &amp;gt; Board &amp;gt; Boards Manager...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type esp32 and install &lt;code&gt;esp32 by Espressif Systems&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now plug your ESP32 to your computer via the USB port.&lt;/p&gt;

&lt;p&gt;Upload whatever example you want to try to make sure your ESP32 works properly, I recommend &lt;code&gt;Wifi &amp;gt; WiFiScan&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you get a permission error while uploading your example, such as : &lt;code&gt;could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Do &lt;code&gt;sudo chmod a+rw /dev/ttyUSB0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Another example you could also try is the &lt;code&gt;WebServer &amp;gt; HelloServer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make sure to change the value of &lt;code&gt;const char* ssid&lt;/code&gt; to your own SSID (your wifi network's name) and add your wifi's password in &lt;code&gt;const char* password&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Upload the code, open the Serial Monitor at a baud rate of &lt;strong&gt;115200&lt;/strong&gt;. Then take your ESP32 and press the &lt;strong&gt;EN&lt;/strong&gt; button on it to do a reset. You'll now be able to see something like this on the serial monitor if everything goes well:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-&amp;gt; Connected to Wifi&lt;br&gt;
-&amp;gt; IP address: 192.168.0.00&lt;br&gt;
-&amp;gt; MDNS responder started&lt;br&gt;
-&amp;gt; HTTP server started&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your web server is online!&lt;/p&gt;

&lt;p&gt;Enter the IP address it gave you in your browser and be greeted by your sweet ESP32.&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>arduino</category>
      <category>hardware</category>
    </item>
    <item>
      <title>"How do I do a Pull Request again?" - the extremely short version</title>
      <dc:creator>Al</dc:creator>
      <pubDate>Thu, 03 Oct 2019 14:31:37 +0000</pubDate>
      <link>https://forem.com/alhern/how-do-i-do-a-pull-request-again-the-extremely-short-version-5c8h</link>
      <guid>https://forem.com/alhern/how-do-i-do-a-pull-request-again-the-extremely-short-version-5c8h</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Fork.&lt;/li&gt;
&lt;li&gt;Clone.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git check out -b [name-of-your-feature]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit your code.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit -a -m [your-commit-message]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push --set-upstream origin [name-of-your-feature]&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's it! Go get your Hacktoberfest swag.&lt;/p&gt;

</description>
      <category>pr</category>
      <category>pullrequest</category>
      <category>github</category>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
