Posted on Leave a comment

Side Hustles For Tech Workers In 2021

Side Hustles In Tech Are Abundant

If you have a skill, then there is always someone willing to pay for that skill. Most of the time for us tech workers we take our skills to a job and work for 40+ hours a week for one company at a time. While tech salaries can be ridiculously high, that is still only ONE stream of income. If 2020 showed us anything, it is that job security is a myth. The only job that is secured is one that you make for yourself! I’m not telling everyone to quit their jobs and become entrepreneurs who work solely for themselves. That wouldn’t be feasible. What is feasible however is for everyone to add multiple streams of income into their lives with some side hustles. Here are five side hustles in tech that can bring you extra money in 2021 right now!

Create & Host Websites

Did you know that less than 2/3 of U.S. small businesses have a website? A lot of business owners are not tech savvy and honestly the thought of creating a website scares them. This is where you can come in and make money two ways. First you can make money upfront by offering to create their website and then you make passive income by charging them for hosting their website. Let’s do some quick math. Let’s say you have a small business website package for $1000 and a hosting package of $30 per month. Let’s say you do 1 website a month:

  • 12 * $1000 = $12,000
  • 12 * $30 per month = $360 per month = $4320 per year

After your first year you made an extra $16320 on top of your regular job pay. If you provide reliable and quality service then your clients will stay with you for hosting. That extra monthly income is infinitely scalable and is worth more than than the $1000 in the long run.

Tutor CS Students

This is a pretty self explanatory side hustle. As more and more people go to university and boot camps to become software engineers and developers, there has opened up a niche for tech tutoring. Get paid to help others by signing up for websites like CodeMentor or advertise your services solo. Tutors easily can make $40-$60 per hour tutoring and while it’s not much when you only do a couple hours, that’s still extra money. Go to your local community college or university and find the CS department and offer your services or some flyers, trust me you will get calls soon.

Sell A Course/E-Book

This one is definitely more involved but can easily be one of your most lucrative passive income side hustles in tech. By creating a course or an e-book in your niche and selling them you are creating evergreen content that can last well beyond the time of creation. A good portion of my website sales come from my courses such as PWA To APK course and once the hard work of actually creating the content is done, it’s a relatively hands off process going forward.

You still need to do marketing if you want consistent growth but you should be reinvesting your sales into ads anyway! Courses can sell for years after they are created, however depending on the context of the course, it may want to be updated from time to time to stay relavent!

Flip Apps

Going on two years ago I wrote a Twitter thread on app flipping using websites such as Flippa. Essentially it works like flipping anything else. You find an app that is undervalued and being sold whether by auction or direct sale. Once you find the app, you can either keep it, enhance it and profit; or you can polish it up and resell it for a higher price. I personally prefer keeping the apps and riding the passive income train.

Create An App

This is the holy grail of passive income in my opinion. The majority of my side hustles are in the form of apps that make me money. This obviously will require the most time and if you are working a full time job you will have to juggle both which is easier said than done. However the reward has the highest potential of all the tech side hustles. Web apps, mobile apps, it doesn’t matter (I do both).

Conclusion

Nothing worth while will happen fast. If you decide to pursue a tech side hustle in 2021 then the first thing you must understand that living a #CodeLife takes time. Be patient, stay focused and HUSTLE. If you enjoyed this article then share it on social media and consider joining the Code Life Newsletter. Every week get fresh updates and inside looks in the world of tech and entrepreneurship with special content only for subscribers!

Posted on Leave a comment

Are You A Front End Web Developer? Congrats, You Are Also An Android Developer.

front end web developer to android developer

Mobile Development and Web Development Are Merging

Progressive web apps (PWAs) are pretty mainstream now and most web developers are aware of their existence. The Android platform and the Google Play store has been around for going on 13 years and developers are aware of its existence. What many are unaware of is how much the two platforms have been merging in the background. Last year I had the most wonderful epiphany. If you are a front end web developer, then by default you can publish Android applications, making you an Android developer as well.

Subscribe to my YouTube for more Tech Talks

What Are The Benefits?

You might be wondering what the benefits of turning your PWA into an installable Android application. Some of the main ones include:

  • Increased visibility
  • Increased revenue
  • Better brand reputation

Increased Visibility

When you turn your progressive web application into an Android application and upload it to the Google Play Store, you are opening yourself to a new realm of SEO called App Store Optimization. This is the search engine that powers the Google Play Store search. Your app will now be available to all Android users (unless otherwise specified). Your app store listing is the gateway to all of these new potential users.

Increased Revenue

When you upload an Android application you can set it to be paid or free. In addition to increased ad revenue (if that is your monetization model) that will grow proportionally with app download and usage; but what about apps that don’t make any money on the web? Those could be one-time paid downloads on the Google Play Store.

Better Brand Reputation

Just by turning your PWA into an Android app, you are increasing your brand reputation! Users trust brands that are on multiple platforms and see it as more established, whether or not this is true for that brand is debatable. Definitely worth the $25 to get a Google developer license.

PWAs and WebAPKs

When Google added PWA support to Chrome on Android they added this cool feature called WebAPK. When a user clicks the “Add To Homescreen” button on the mobile browser, the Android operating system actually creates a special APK on the fly, sign and install it. This feature is powerful and can lead to easy accessibility for web apps now and in the future. When I first heard of this, I immediately went to work converting all of my web applications into progressive web applications. Thinking this is the pinnacle I told myself I bought my Android developer license for nothing I will just push installs this way; but then I found something better.

Android Trusted Web Activities

Android now has this cool new way of working with your PWA inside of your app called Trusted Web Activities. TWAs have a lot of benefits but my top two are:

  1. Content in a Trusted Web activity is trusted — the app and the site it opens are expected to come from the same developer. (This is verified using Digital Asset Links.)
  2. The content rendered in a Trusted Web Activity comes from the web: they’re rendered by the user’s browser, in exactly the same way as a user would see it in their browser except they are run fullscreen. Web content should be accessible and useful in the browser first.

Let’s say you already built your PWA and you need an Android application but you need to do some extra things that are beyond the current scope of web apis but everything else is in the PWA. Using Trusted Web Activites you can interact with your application and the native APIs provided by Android. The PWA has to come from the same developer who is creating the Android application and is done using Digital Asset Links. This is a file proves you are the owner and once you upload this file to your server, Google will verify. This ensures security and that you aren’t ripping off someone eles’s PWA for your own profit. Also by uploading an Android app that is based on your PWA you don’t have to worry about updates (as much). Once you update the PWA, your application will reflect those updates, thus reducing code time.

But wait….doesn’t that require me to first write an Android app that calls the TWA?

Yes however AUTOMATION BABY! There are tools that I use that make generate the source code and the APK so all I have to do is upload it to the Google Play Console as a new app. I never touch any Java/Kotlin code. I created a course that shows you how to take ANY non PWA web application and turn it into a PWA and APK in under 30 minutes! Expand your visibility and earn more income by diversfying your platforms!

Posted on Leave a comment

Tips for Parents Returning to College Before Reentering the Workforce

Image via Pexels

Tips for Parents Returning to College Before Reentering the Workforce

You all know I am all for alternative paths in finding your career outside of college. However I realize for some, that is not an option. For parents who have been at home with their kids for an extended period of time, it can be hard reentering the workforce. One great way to kickstart your career again is by going back to school to gain a new degree or certification. These days, it’s easier than ever to earn a degree online, meaning you can still keep up with your parental responsibilities while taking classes.

Going back to school: considerations, perks, and challenges

One of the great perks of going back to school before you return to your career is that you’ll have an opportunity to learn about what’s changed in your industry while you were at home with kids. For many industries, even a few years can bring about a great deal of change and growth, so returning to school will allow you to brush up on new practices or trends while upskilling at the same time.

If you’re considering going back to school, think about your career goals and pick a program that will help you land a fulfilling job when you’re finished. For example, if you want to stay in the same career field and you already have an undergraduate degree, earning a master’s degree will help land you in a higher earning bracket with more senior positions. However, if you’re considering a brand new career field, it might be necessary to earn a bachelor’s degree to start over. 

Being in school while parenting will bring about its own unique set of challenges, so make sure you have a good plan to maintain childcare during classes and to give you study time. If you have a partner, come up with a schedule that will allow you time to focus on school. If you’re a solo parent with young kids, consider childcare options such as getting a babysitter or finding a daycare that can give you enough time to complete your schoolwork. 

Types of online degrees

When you’ve made up your mind to return to school, consider career paths that might align well with your life as a parent. Some stay-home parents choose to earn a teaching degree because of the vacation time teaching affords: having summers off allows for plenty of time at home with the kids. 

Many online teaching degree programs will help you obtain your teaching license. Most states require transcripts, a background check, entrance exams, and skills tests to get a teaching license.

Staying sharp

Returning to school after a long break can be tough, but there are ways to keep your brain sharp during the transition. Be sure to maintain healthy habits such as eating well, exercising, and getting enough sleep at night. Your brain will stay much more focused if you have proper nutrition and are well-rested. It’s also important to maintain your downtime activities—your stress levels will stay low if you can balance out the schoolwork with personal time.

Your return to school will mark a major transition for you and your family, but it will help set you up to reenter the workforce with confidence and new knowledge. Remember that it’s important to pick a program that will help you land a job in the industry you’re most interested in, and be sure to chart out a clear path for your post-grad employment. Finally, keep your mind sharp by staying healthy and taking supplements.

Need customized ad and app solutions? My company J Computer Solutions LLC can help take your business to the next level! Want a 1-on-1 consultation? Book one with me here.

Signup For The Code Life Newsletter

Gets delivered weekly right to your inbox, with subscriber only content, deals and more!

Posted on Leave a comment

Create An Online Radio & Podcast Streamer Using Vue and Media Session API

The Media Session API

I love listening to podcasts and online radio. I used to run an online station a fews ago called 90K Radio and I was hooked in the community ever since. Keeping on track with my PWA binge I thought it would be a cool to write a progressive web app that can take in any stream URL and play it. Not only that but I want to be able to control the audio using the native audio commands on Android, iOS and desktop. There is this awesome javascript API called the Media Session API. The Media Session API allows you to customize media notifications and how to handle them. It allows you to control your media without having to be on that specific webpage. This allows for things such as background playing ( a must need feature for online radio PWA). You can even do things like set album artwork and other metadata and have custom handlers for events such as skipping tracks and pausing/playing.

What Are The Benefits?

Primarily I built this because a PWA will load faster. Also no tracking, I don’t have to worry about Google or anyone else tracking my activity, I can just listen in peace. By using the media session API I can listen in the background whilst doing other things which most likely will be every time I use the app. Lastly it’s just an awesome feeling to use your own software 😅.

The Vue Application

I created the vue application using the standard Vue CLI and added Vuetify so that it has some basic responsive styling. The app has one component called Radio.vue which holds all of the logic. The application has some preset radio stations that I can click as well as a text field where I can put in any URL of their choosing for play. It also grabs an RSS feed for a few of my favorite podcasts so I can quickly listen. Everything is done client side including the RSS XML parsing! You can view the live version here and clone the repo here.

Let’s Get Coding

As I stated above, I created a new Vue application using the vue-cli and added vuetify using the vue add vuetify command. For brevity I will skip that part and only talk about the Radio.vue component which holds all of the logic. This component will grab the preset stations and turn those into buttons. The favorited podcast RSS feeds it will grab, parse the XML and play said podcast. There is a URL text input that the user can manually put an audio stream URL in. Finally I set the Media Session metadata to show the cover art and info of whatever is playing and if I don’t have it show a default image, artist and album.

<template>
  <v-container>
    <v-row class="text-center">
      <v-col cols="12">
        <v-img
          :src="require('../assets/logo.png')"
          class="my-3"
          contain
          height="200"
        />
      </v-col>

      <v-col class="mb-4">
        <h1 class="display-2 font-weight-bold mb-3">
          Welcome to PWA Radio
        </h1>

        <p class="subheading font-weight-regular text-center">
          <v-text-field type="url" placeholder="Enter stream URL" v-model="url" label="Stream URL" />
        </p>
        <v-row class="text-center">
          <v-btn v-on:click="playAudio" v-if="!isPlaying">Play</v-btn>
          <v-btn v-on:click="stopAudio" v-else color="red">Stop</v-btn>
        </v-row>
      </v-col>
    </v-row>
    <v-row class="text-center">
      <v-btn class="pa-md-4 mx-lg-auto" v-for="x in presets" v-on:click="setAudio(x)" :key="x.name" :color="x.color"> {{x.name}} </v-btn>
    </v-row>
    <v-row class="text-center">
      <v-select
          v-model="currentPodcast"
          :hint="`${currentPodcast.name}, ${currentPodcast.author}`"
          :items="favoritePodcasts"
          item-text="name"
          item-value="url"
          label="Favorite Podcasts"
          persistent-hint
          return-object
          single-line
          @change="playPodcast"
        ></v-select>
    </v-row>
  </v-container>
</template>

<script>
  export default {
    name: 'Radio',

    data: () => ({
      isPlaying: false,
      audio: {},
      url : '',
      currentPodcast: {},
      selectedEpisode: {},
      presets : [
        {
          name: 'WEKU-NPR',
          url : 'https://playerservices.streamtheworld.com/api/livestream-redirect/WEKUFM.mp3',
          color: "green",
          author: 'NPR'
        },
        {
          name: 'WEKU-Classical',
          url: 'https://playerservices.streamtheworld.com/api/livestream-redirect/WEKUHD2.mp3',
          color: 'orange',
          author: 'NPR'
        },
        {
          name: 'Vocalo Radio',
          url: 'https://stream.wbez.org/vocalo128',
          color: 'blue',
          author: 'NPR'
        },
        {
          name: 'WFPK',
          url: 'https://lpm.streamguys1.com/wfpk-popup',
          color: 'yellow',
          author: 'NPR'
        },
        {
          name: 'KEXP',
          url: 'https://kexp-mp3-128.streamguys1.com/kexp128.mp3?listenerid=8044407b7410ad01f8210fd508279708&awparams=companionAds%3Atrue',
          color: '#cb349a',
          author: 'NPR'
        }
      ],
      favoritePodcasts: [],

      podcastURLS: [
        { url: 'https://anchor.fm/s/fdc3ac0/podcast/rss', name: 'Code Life' },
        { url: 'https://anchor.fm/s/42d5fca4/podcast/rss' , name: 'Intimate Spaces' },
        { url: 'https://feeds.npr.org/510289/podcast.xml', name: 'Project Money'}

      ]
    }),
    methods: {
      setMediaControls: function () {
        if ('mediaSession' in navigator) {
          navigator.mediaSession.metadata = new window.MediaMetadata({
            title: 'Pocket Radio',
            artist: 'J Computer Solutions LLC',
            album: 'Pocket Radio',
            artwork: [
              { src: 'https://radio.jcompsolu.com/images/logo-96.png',   sizes: '96x96',   type: 'image/png' },
              { src: 'https://radio.jcompsolu.com/images/logo-128.png', sizes: '128x128', type: 'image/png' },
              { src: 'https://radio.jcompsolu.com/images/logo-192.png', sizes: '192x192', type: 'image/png' },
              { src: 'https://radio.jcompsolu.com/images/logo-256.png', sizes: '256x256', type: 'image/png' },
              { src: 'https://radio.jcompsolu.com/images/logo-384.png', sizes: '384x384', type: 'image/png' },
              { src: 'https://radio.jcompsolu.com/images/logo-512.png', sizes: '512x512', type: 'image/png' },
            ]
          });

          navigator.mediaSession.setActionHandler('play', this.playAudio());
          navigator.mediaSession.setActionHandler('pause', this.pauseAudio());
          navigator.mediaSession.setActionHandler('stop', this.stopAudio());
          navigator.mediaSession.setActionHandler('seekbackward', function() { /* Code excerpted. */ });
          navigator.mediaSession.setActionHandler('seekforward', function() { /* Code excerpted. */ });
          navigator.mediaSession.setActionHandler('seekto', function() { /* Code excerpted. */ });
          navigator.mediaSession.setActionHandler('previoustrack', function() { /* Code excerpted. */ });
          navigator.mediaSession.setActionHandler('nexttrack', function() { /* Code excerpted. */ });
        }
      },
      playPodcast: function () {
        this.setAudio(this.currentPodcast)
        this.playAudio()
      },
      playAudio: function () {
        if(this.isPlaying){
          this.isPlaying = false
          this.audio.pause()
          this.audio = {}
        }
        this.audio = new Audio(this.url)
        this.isPlaying = true
        this.audio.play()
          .then(()=> {
        }).catch(error => { console.log(error) });
      },
      pauseAudio: function () {
        this.audio.pause()
        this.isPlaying = false
      },
      stopAudio: function () {
        this.audio.pause()
        this.audio = {}
        this.isPlaying = false
      },
      setAudio: function(preset) {
        this.url = preset.url
        navigator.mediaSession.metadata.title = preset.name
        navigator.mediaSession.metadata.artist = preset.author
        if(preset.image) {
          navigator.mediaSession.metadata.artwork = [
            { src: preset.image }
          ]
        }
        this.playAudio()
      }
    },
    mounted () {
      this.setMediaControls()
    },
    created () {
      this.podcastURLS.forEach(pod => {
        fetch(pod.url)
        .then(response => response.text())
        .then(str => new window.DOMParser().parseFromString(str, "text/xml"))
        .then(data => {
          const items = data.querySelectorAll("item");
          for (let i = 0; i < items.length; i++) {
            let item = items[i];
            console.log(item)
            let image = item.getElementsByTagName("itunes:image")[0].getAttribute("href")
            let title = item.querySelector("title").innerHTML.replace("<![CDATA[", "").replace("]]>", "")
            let author = item.getElementsByTagName("dc:creator")[0].innerHTML.replace("<![CDATA[", "").replace("]]>", "")
            let url = item.querySelector("enclosure").getAttribute("url")
            let podcast = { name: title, url: url, image: image, author: author }
            this.favoritePodcasts.push(podcast)
          }
        })
      })
    }
  }
</script>

Conclusion

This was a fun and easy PWA to make and I will turn it into an Android application to put on the Google Play Store (learn how with my PWA to APK course). Some features I will add will include:

  • save favorites locally using indexDB
  • create queue that can be skipped
  • download podcast episodes
  • Have everything play via the WebAudio API and add visualizations.
Posted on Leave a comment

Jeff Bezos Steps Down As Amazon CEO

Jeff Bezos Will Step Down As CEO This Year

In Q3 of this year Jeff Bezos will step down as CEO of Amazon, a role he has held since the company’s inception and Andy Jassy the top cloud executive will take over as the new CEO. Bezos will still retain his role as chairman of the board for the company. Starting as an online book retailer, Jeff Bezos grew Amazon to a $1.6 trillion company in a span of little over 20 years. 

Andy Jassy currently leads the AWS department, which accounts for the majority of Amazon’s income. Last year alone AWS grew 28% in the fourth quarter alone.

Why Is Jeff Bezos Stepping Down?

In a statement today Bezos said that he is stepping down so that he can focus on his philanthropic endeavors as well as his other projects such as Blue Origin, Amazon Day 1 Fund and more. Honestly it makes sense given that Amazon wasn’t the only endeavor Jeff Bezos had, and the amount of time and energy Amazon requires. Money is obviously not a motivator he is worth almost 1/5th of a trillion, time is more valuable to him. 

My Personal Thoughts

In my personal opinion I think Jeff Bezos is tired. Amazon is a multi-billion dollar per year corporation that has had lots of social scrutiny the last few years. He has made history with Amazon he did what he sought out to do and more! I also think a part of it is true philanthropy. I know he is billionaire and a lot of people have a mindset that billionaires should not exist, however I belive in The Gospel Of Wealth.

The Gospel Of Wealth is a philosophy that teaches that the more wealth you have, the more of a morale obligation you have to humanity. Jeff Bezos is the prime person who should live by this philosophy.

Jeff Bezos stepping down to fulfill philanthropic endeavors is going to give him the chance to show us if he is a believer in The Gospel Of Wealth or not. Only time will tell but I like to be an optimist more times than not.

Possible Political Ambitions

Another reason I could see him stepping down as CEO of Amazon is that he is eyeing political office. This gives him time to focus on heavy political networking and not be distracted by running a successful company. We are definitely in the big money political era and Bezos could self fund any campaign he wished. 

Bezos is a household name and name recognition is the number one metric for political campaigning. The majority of Americans use and rely on his company and would probably have an emotional attachment to his candidacy. Once again these are purely my thoughts and only time will tell what he will actually do once he steps down.

Sign Up For The Code Life Newsletter

Stay up to date on the blog, latest products and subscriber only content! The newsletter is completely free and goes out weekly!

Showing 1–1 of 14 results

Posted on Leave a comment

You Need Your Own Website & Email List In 2021

2021 Has Started Off With A Bang!

We are officially in Feburary 2021 and last month was cray cray! I also believe January 2021 proved a point I have been trying to hammer for years now: YOU NEED YOUR OWN PLATFORM IF YOU RUN A TECH BUSINESS! I know in 2021 it is very easy to get into the modality that all you need is social media but I am going to explain why that should be an auxillary and not your main source of outreach! Owning my own website and setting up an email list were the first things I did when I quit my job in 2017.

You Don’t Control Social Media

Services such as Facebook, Twitter, TikTok and YouTube all have their own unique perks. First off they are free to sign up and use and you can organically grow your audience to the MILLIONS! Many personal and business brands do very well on social media! However there is one major drawback to relying on social media….YOU DON’T OWN THE PLATFORM! When you don’t own the platform in which you serve your content several things can happen that drastically affect your reach such as:

  • Changes in the algorithm
  • Changes in the TOS
  • You can be blocked/banned
  • The platform could literally go away

Changes In The Algorithm

When a platform such as Twitter and Facebook change their algoirthm for their news feed, you have zero control over that. Depending on what the changes are your content might not reach as many people as it did before. If you rely on these platforms primarily then that will directly affect your income!

Changes In The TOS

Terms Of Service or TOS is the contrat you abide by when you sign up for these platforms. Basically it says what you can and cannot do on a platform. Once again you have no say in this because you don’t own the platform. When a platform controls what you can and cannot say that directly limits how you can market to your consumers. This problem doesn’t exist when you own and control your own website.

You Can Be Banned/Blocked

Just look at all these platforms and former President Donald Trump and his allies. While you can argue that it was the right thing to do (it was F*CK Trump!) the fact remains that when you own and control your own website and emailing list you can’t be censored, banned or blocked.

The Platform Can Literally Go Away

Seriously look at Parler 😂 but ya imagine you having 100’s of thousands of followers WITHOUT a website and email list of said followers and the platform shuts down! You just lost your only link to your customers. Need I say more?! Own your content and you never have to worry!

The Wonders Of Email List Marketing

Let’s be honest, follower counts on social media platforms are vanity metrics. Alot of followers aren’t even real people! When you own a website and an email list, you know those who are following you are loyal real potential customers who rock with your content. Think about it. Email is sacred, we tend to only subscribe to email lists if we genuinely want the content delivered to us. I would argue that an email sub is the most import following you can have! When you have an automated email list set up via MailChimp or whatever provider you can constantly engage the audience that is most likely to:

  • Read your content
  • Buy your products
  • Promote on your behalf

Ownership Is The Goal For 2021

Whether you are just starting your brand or are established but want to make the transition to full ownership, my company J Computer Solutions LLC is the best at website design and hosting! We also can help you establish your email list and teach you how to effectively grow and expand it! Lastly it wouldn’t be a good blog on email lists if I didn’t ask you to join mine! Join the Code Life newsletter to get up to date info on the blog, new courses and subscriber only content!

Posted on Leave a comment

Fixing A Hacked WordPress Site

Hacked WordPress Sites Suck!

Back in November my company J Computer Solutions LLC was the subject of a WordPress hack that affected all of my client and personal websites! This was an expensive lesson in security and eventually I recovered my client data! As a result of this experience I have decided to share with you what I did to help those who are also experiencing the same thing. I’m even going to throw in some tips to prevent this from happening in the first place!

How It All Started

So one day I get a bunch of emails from my monitoring app that is telling me that not one, not two but ALL OF MY WORDPRESS sites were down. No sooner I start getting a barage of calls and texts from my clients complaining that their websites (many of whom, these sites were the backbone of their businesses) where down. After talking to each client individually I narrowed down the cause. One of my clients had installed a cracked plugin to avoid paying the original developer. I promptly removed him from my service.

A cracked plugin is a pirated plugin that allows website administrators to use software without paying the original developer. Often these plugins have malware embedded inside them, hacking the site.

What Was The Hack

The hack would place <script> tags on every .php page and in every post in the database that would cause a series of redirects to a bunch of spam sites. This happened on all of my WordPress sites and the first thing I noticed was that all of the sites were going redirecting to the same series of three URLs. Knowing that the hack was caused by a plugin and not a human meant that if I could reverse engineer the hack, I could come up with a algorithmic solution to fix all of my hacked WordPress sites.

wordpress hack redirect
An example of one of my client sites doing redirects

Fix: wp export & RegEx

I knew I wasn’t going to go through all the .php files and remove the malware; way too many files and the database is more important I can always reinstall WordPress. That being said I decided the best thing to do was the following

  • Install a fresh version of the website on a new server
  • Export the post, page and product data using the wp cli
  • Use RegEx to find and replace malware data with appropriate data

Luckily I use Laravel Forge and can manage my WordPress installations from a dashboard. I created a fresh database and fresh WordPress instance.

On the old instance, I SSH’d into the machine and ran the following command in the website directory

wp export

This will generate a .xml file that contains all of the post, page and product data. After opening the .xml file in Atom I see one of the URLs immediately

Ya.....that is not my URL

Atom has some great RegEx find and replace functionality I needed to replace all these URLs with the URL of the website here is an example for this site.

After replacing all malware URLs you can save the .xml file and head back to your fresh installation. Head over to tools -> import and select the default WordPress importer. Simply upload the XML file and you should have your site back hack free!

Hacks Are Horrible

However they can be mitigated, I hope this tutorial helps anyone who experienced the same hack I did and can get their sites back up. If this did help you please share the blog post!

Posted on Leave a comment

Why You Should Use Twitter Fleets To Promote Your Apps

Twitter Fleets Are Here

Twitter has introduces a “Stories” like feature today called Fleets. Essentially they are tweets that disappear after 24 hours. Yours and all of the people you follow’s Fleets appear on the top of the timeline. While many people were upset they got stories instead of an edit button (it’s a stupid idea and will never happen stop asking) content creators and entrepreneurs such as myself were elated. Twitter is where most of my reach happens personally, I average 200K impressions per month and most of my clients come from the platform. In this article I will explain why you should be using Twitter Fleets to promote your apps and help you continue to live a #CodeLife

Twitter launched Fleets today and it is awesome!

Fleets Offer An Incentive Of Time

The number one reason I feel Fleets are a great addition to app developers trying to promote their apps and brands is because of the fact that they disappear after 24 hours. This creates a sense of urgency for your followers to see your content. Take the scenario below:

You are a game developer and want to promote your latest DLC content. You have a decent sized following on Twitter. You tell your followers that over the next 5 days you will be posting Fleets with bits of a coupon code and if you have all the pieces you can get the new DLC for free.

Over the next 5 days your followers who want this new DLC will be anxiously waiting for you to post your next Fleet, thus creating user engagement. This is just one example but it can be extrapolated and juxtaposed across many.

Another way that app developers can use Fleets is for promotions of upcoming events such as app launches. Instead of clogging the TL with simple tweets such as ” X launches in Y days!” You can make a story, still gets the message across to your audience while leaving your timeline open to more quality posts.

How will you use Fleets to promote your apps? Leave a comment below and don’t forget to sign up for the #CodeLife investment group and start earning residual income with apps!

Posted on Leave a comment

Building A Twitter Discord Bot In Node.JS

Discord Is Awesome, So Is Twitter

I have a discord server and I have a pretty decent sized Twitter following. I wanted to add a bot that followed my tweets and sent them as messages in my #twitter channel on my server. I refuse to pay for software and I have a hyper distrust of other’s software so I wrote my own. In this node.js script I have one file main.js that uses 3 dependencies: twit (for Twitter streaming API), Discord.js (for well….Discord) and dotenv (to load environment variables). The script is ~30 lines long and is available on my Github.

Create a Discord Bot using the Twitter Streaming API

Main.js

require('dotenv').config()
const Twit = require('twit')
const Discord = require('discord.js');
const client = new Discord.Client();
var T = new Twit({
  consumer_key:         process.env.TWITTER_CONSUMER_KEY,
  consumer_secret:      process.env.TWITTER_CONSUMER_SECRET,
  access_token:         process.env.TWITTER_ACCESS_TOKEN,
  access_token_secret:  process.env.TWITTER_ACCESS_TOKEN_SECRET,
  timeout_ms:           60*1000,  // optional HTTP request timeout to apply to all requests.
  strictSSL:            true,     // optional - requires SSL certificates to be valid.
})
client.login(process.env.DISCORD_TOKEN);
client.once('ready', () => {
  var stream = T.stream('statuses/filter', { follow: [process.env.TWITTER_USER_ID] })
  stream.on('tweet', function (tweet) {
    //...
    var url = "https://twitter.com/" + tweet.user.screen_name + "/status/" + tweet.id_str;
    try {
        let channel = client.channels.fetch(process.env.DISCORD_CHANNEL_ID).then(channel => {
          channel.send(url)
        }).catch(err => {
          console.log(err)
        })
    } catch (error) {
            console.error(error);
    }
  })
})

.env file to load variables.

TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_USER_ID=
DISCORD_TOKEN=
DISCORD_CHANNEL_ID=

Now all you have to do is run it using the following command

node main.js

Don’t forget to get your application keys from the Discord developer portal and the Twitter developer portal. I made a Youtube video showing the process in detail. Want to start making money and living a #CodeLife? Join the group today!