Social media might be sucking up your precious time without you knowing...
Facebook claims that it has approximately 3 billion active users on their platform at the time of writing. That's almost half of the worlds population. TikTok, recently recorded roughly 1 billion active users. Not to mention the number of users on Instagram, Snapchat, Twitter, WhatsApp etc.As more people continue to use social media platforms, the more the numbers continue to augment. This shows that social media has become or is becoming an integral part of the lives of almost everyone.Some people use social media for different purposes like building brands, marketing products to potential customers, receiving news updates, acquiring partnership deals.Yeah, I know right, I too just use it for memes. I mean, who has that energy to start selling stuff to friends on Facebook when there are lots of funny posts to scroll through, pictures to like and comment on? In fact when I'm done scrolling, I'll open my WhatsApp to check if there are new status updates, steal the funny ones and post them on other social platforms so that I can equally get a few like emojis too.According to this survey, one of the main reason why people use social media is to tackle boredom. The same survey also concludes that the average daily time a user spends on social media is 2 hours and 27 minutes. Mine used to be somewhere between 3 - 4 hours. Yeah, that's a lot of time especially when you're not doing anything productive.In fact, if we do the math correctly, we'll realize that 3 hours a day adds up to 90 hours a month which adds up to 1080 hours (one and a half months) a year.So if you're like me, it means every year, you "loose" one and a half months to social media alone. Just think about that for a second. And if that means nothing to you, Ermm... I'll suggest you probably should stop reading this post and open your Facebook.But if this is surprising to you, well that's not the case to the social media companies because they have designed their platforms to be addictive. Very addictive.TikTok for example ensures that its videos are kept short so as to keep users more engaged. While keeping it short, they'll also recommend you lots and lots of other videos similar to the ones you've previously watched, which will most likely draw your attention to them.Facebook on the other hand, offers instant gratification in the form of likes, views and comments to your posts, virtual friends, well targeted content based on the content you previously had more engagements to and more. All these things keep your dopamine hormone levels up, forcing you to spend more time on the platform.You might unfortunately not realize how much time you spend on these platforms because, just like me, you'd probably use it for a short period of time, say 5 - 10 mins and then switch to other tasks and then switch back when you get bored and so on till the day is over. But you might not realize that those short periods of time adds up.If you don't believe me, then tryout this little experiment. Install an app like, Digital Wellbeing which records the amount of time you spend on your mobile apps. Then make sure to use your phone as you normally would without the recorder. At the end of the week, look at the statistics the recorder will present to you. Believe me, the results will startle you.Of course social media is very useful. It helps us to quickly keep up with families and friends. However, there's a very high probability of overuse, since it was designed that way anyways.In this post, I'm not trying to bring you to a conclusion of whether social media is good or bad. I believe we all have the cognitive ability to discern what we regard as good or bad for us. I just want to draw your attention to how much time you might be spending on social media without realizing. Maybe regaining this time could help you read new books, learn new skills, begin new trades, grow your spirituality, and more.I hope you found this post insightful. I'd equally love to learn from you. So please feel free to email me your opinions, views or feedback at: email@example.com.Till I come your way again, adieu.2022-04-16
Github authentication using personal access tokens
Few days ago, I was having a good time writing some TypeScript codes for my new project. I would switch to different git branches, commit code, and all that stuff. Everything seems to have been going alright until I was ready to push to github.So I add my remote repository with;git remote add origin http://github.com/nkemcels/screentime.git And thengit push -u origin master As usual, Git asks for my username and password and I give it to them, but out of the blue, this happens:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: unable to access "..." : The requested URL returned error: 403My happy mood suddenly changes to a stackoverflow mood. After lots of research, it turns out that github had deprecated password authentication in favor of using Personal Access Tokens (PAT) for security reasons.In this post, I will share with you two ways you can authenticate to your remote repositories the new way and push your codes to, cloning or pulling from private repositories.Before we start with any of the two approaches, we'll need to generate a github Personal Access Token.Generating a Personal Access Token (PAT)I have written a more detailed post on how to generate a personal access token herehttp://celsoppe.com/posts/3Please read through if you are not yet familiar on how to generate one.METHOD 1: With your new PAT, head over to your waiting cli and change/set your git remote asgit remote set-url origin https://<PAT_here>@github.com/<username>/<repo> An actual example of the command above would look like thisgit remote set-url origin https://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@github.com/nkemcels/screentime.git That is it my friend. You should be able to push to and pull from your repository without any hassle.Cloning a private repository using this method is similargit clone https://<PAT_here>@github.com/<username>/<repo> This approach is the easiest way of authenticating to your remote repositories. However, you'll have to use your PAT directly on every repository you create. Imagine you have a lot of repositories configured this way and one day you decide to update your PAT. You'll have to start moving from one repository to the next, updating remote URLs to match the new PAT. Maybe this might be a great exercise for you, but as for me, I wont find it funny. Luckily, there is a second and a more elegant way (IMO) to do this which we shall be looking at in the second method.METHOD 2: This method is OS specific. So follow the instructions that matches your operating system.For Windows:From the Control Panel, got to Credential Manager Select Windows CredentialsLook for git:https://github.com , select it and click on Edit.Update the password field with your Personal Access Token and you are good to go.If you could not find git:https://github.com in step 3;Click on Add a generic credentialSet the internet address to git:https://github.comType in your github usernameIn place of password, enter your Personal Access Token.Click Ok and you are good to go.For MacOs:Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type Keychain access and press Enter.In the Keychain access app, search for github.com.Find the "internet password" entry for github.com.Edit the entry with your Personal Access token and you are good to goOnce you have setup your github credentials for your operating system, you do not need to add them anymore to your repository urls. All subsequent pull, push, clone commands to your remote repositories shall be automatically authenticated by your operating system. If you get a password prompt, it means the instructions were not properly followed.Hope that helped. Till we meet again, adieu.2022-03-10
How to generate a github Personal Access Token
A github Personal Access Token (PAT) is a long string of characters that is used in place of a password to authenticate git/github operations. You could configure your PAT to permit just certain actions be performed with it as we'll see. This prevents a total disaster from occurring with your account if somehow someone somewhere got access to your credentials.Follow these steps to generate your Personal Access Token.Generating a github personal access token.Step 1: Sign in to githubStep 2: Click on your profile photo at the upper right corner of the page, then click on SettingsStep 3: Scroll down and click on the Developer settings option in the left paneStep 3: Select the Personal access tokens option in the left paneStep 4: Click on the Generate new token action. You might be prompted to enter your github password after you've clicked on it.Step 5: Provide a descriptive name for your tokenStep 6: Select an expiration date for your token. Your token will expire after the set period and you'll need to regenerate a new one. You can choose Never if you do not want your token to expire.Step 7: Select the scopes/privileges you'd want your token to have. You'll need to at least have the repo scope selected to be able to push codes to your repository.Step 8: Finally, click on Generate token to generate your token.Step 9: There you have your token. Note that if you do not copy it now, you'll never find it again once you refresh that page, leaving you with the only option of regenerating a new one.Hope that was easy. Till we meet again, adieu.2022-03-10