E.B.'s Lab http://wp.ebislab.com Beautiful strange experiments Sun, 12 May 2019 10:54:53 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.4 Why it’s a bad Idea to host your WP site locally http://wp.ebislab.com/why-its-a-bad-idea-to-host-your-wp-site-locally/ Thu, 09 May 2019 23:43:23 +0000 http://wp.ebislab.com/?p=651 Hello there! (Insert explanation as to why I’ve been missing)

So something a client requested was the ability to self host a WordPress site on his local computer. Initially, this sounded like a great challenge to tackle. In theory, no monthly, annual, or cycle costs and renewal costs. Plus you get to be in total control of your server. But after researching it a bit, I learned that it is alot more dangerous than what what it is. I truly can’t imagine wanting to do this unless you need physical access to the drives in the event of a police raid or something…but then, bruh. What do you need to hide? UH?!

Let’s explore the different scenarios:

  1. You’re legally responsible for all security issues/ attacks etc..
  2. You’ll be investing the time to maintain whatever stack you end up on, and then when you don’t patch it and it gets exploited, who KNOWS what’s on your machine at that point
  3. Long term maintenance costs and liability issues
  4. It’s almost definitely gonna be way slower than even mid-range shared hosting
  5. Your electricity cost / effort costs / annoyance
  6. What happens if there’s a power cut? Internet goes down?
  7. No redundancy in a basic setup! Once you add that you’ve more than blown away any potential cost savings
  8. A cat could ruin the whole set-up with an errant cup of coffee
  9. Everything could be highly flammable … which is why we have server rooms that prohibit food and beverages and remain at a set temperature constantly
  10. You would need a really good UPS which ends up costing as much as it would to host in a dedicated company for a few years.

I think there’s good reasons to self-host things, especially if outages are expected and built into the architecture. There’s some decentralized networking apps that would be great to self-host easily on their own hardware, but nothing where there’s an expectation of connectivity should be running off somebody else’s personal computer.

Power outages and cats aside, running a server that is connected to the internet is really not something you should do unless you really know what you are doing. WordPress is a HUGE target for hackers. Unless you keep the server up-to-date and have some general awareness of security best practices and keep an eye out for new vulnerabilities, it is going to get hacked.

If money is the problem there’s really great hosting companies out there with great rates that will give you a bang for your buck. Fast Commet has been one I’ve really enjoyed. Their introduction rate stays the same even when you renew, unlike Hostgator (also my favorite and possibly one of the best one I have used ) which do have a low intro rate when you sign up but at the renewal they charge you double the price.

]]>
2018 Gadgets win http://wp.ebislab.com/2018-gadgets-win/ Wed, 16 Jan 2019 21:40:00 +0000 http://wp.ebislab.com/?p=628 Happy New Year!! Thought I’d start doing these more often since one of my other specialties is to rave about products that work till I’m blue in the face.

To all the hard of hearing folks out there. Listen up! THIS device is a life changer. One of the most amazing gadgets that I’ve come across this year is the wireless ear buds.

I actually came across this late 2017 while rummaging through the clearance pile at this random liquidation store. It was one of those cheap knock offs of the Apple Airpods because your gal is living the bougie on a budget life. I bought 4 pairs, I can’t exactly remember what I did with all of them, (probably gave them to family). I looked online, and found alot of them for the price that I paid for to come with just one ear bud in a set, so you can imagine how I lucky I was getting the both pairs for one set. I also scored one pair with the full kit which included the dock, and this is what I’ll use to measure my review for this awesome device. I paid 5 bucks for this, and because I was apprehensive of this , I gave it about 2 weeks before it would stop working. I based this off a past Groupon purchase of a wireless earphones, and they lasted…. no more than 2 weeks.

This special baby lasted me… you wouldn’t believe…. a measly 9 months. The funny part was that it’s been dropped and stepped on so many times, yet it still went on. I’ve accidentally left it in my pocket and threw it in the laundry numerous times. When I thought all hope was lost, I’d leave out to dry, and then would leave it charged all night until the indicator light turned on, and things were back up and running. Eventually it’s the battery would run out alot faster. for about 8 months or so, It would give me 3-4 hours of charge. Eventually it would only give me at most 1 hour, and then one day it stopped taking the charge.

To the white faux airpod. I raise my glass to you, and celebrate your longetivity.

You can imagine how impressed I was, I’ve decided to start exploring the big guns, the authentic stuff. I went through a few bad apples you can say.

I needed them to match the specifications of fitting in and accommodating my small ears, not look bulky, look as invisibile as possible. They were impossible to find! I even looked through IndieGoGo to see if maybe if they existed.

I found something close while researching and it pointed me to a brand in Best Buy. Purchased it, tried it for a whopping 79 bucks. It was actually great, but I realized that an important feature to me was the ability to not sync the earbuds to work at the same time. I wanted the ability to use one earbud and have the other one charging, so that if what I was using’s battery died, I would swap out with the other. Get it? An infinite amount of use.

So during my trip to return it I stumbled on the Rowkin brand which seemed too good to be true. They were the smallest I’ve seen in the store, 20 dollars more than what I had paid for the previous one, and worked for most of my devices, except for my Microsoft phone, and we all know how we feel about the Microsoft phone.

Excellent product!

First let’s go over the pros: both pairs work independent of each other. When I take one out of the case, it immediately turns on and syncs automatically to my device.

I have a nice sounding lady alerting me that the battery is about to die, which gives me enough time to pop it out of my ear, into the dock, swap it out with the other one. I don’t have to do a single button clicking. Everything turns off and on automatically based off your movement.

The cons: The dock-case has an odd design and when I pop the earbuds in, I’m scared that they’ll stay stuck in there if I just popped them out aggressively. I felt that I needed to be delicate in how I pulled them out. My fears were justified when 3 months later, my right side earbud top came out exposing the wires inside. It was still stuck inside. I was able to put it back, and of course it was still working, but at this point, it felt like any sudden movement I made would permanently damage the device.

The beauty of living in America is that you can return stuff when they go bad if it falls under the warranty guideline. So that’s what I did. The folks at Rowkin were very nice and helpful in my process of replacing my device. It should arrive in the mail in a few days or so.

Overall, I would give this a 7/10. The earbuds themselves a 9/10. 1 point off, even thought they are the smallest I’ve seen, they felt bulky .

]]>
Current Interests http://wp.ebislab.com/current-interests/ Wed, 05 Dec 2018 20:33:52 +0000 http://wp.ebislab.com/?p=586 Now that I am pursuing this field, I can’t help but notice alot of interesting projects, courses and tutorials that I come across. Since 2019 is underway, I am planning to familiarize and/or improve in these topics

  • React
  • Angular Js
  • Free Code Camp courses
  • Coursera theoritical classes
  • SVG animation
  • vector
  • Photoshop
  • Node.js
  • Python
  • 100dayCss Challenges
  • Database design
  • UX/UI
  • Digital Marketing
  • Google AdWords
  • Android Basics
  • Fullstack development

Now this is not to say I will complete all these by the end of 2019, but this a checklist of the topics I have been researching that I have peaked my interest.  I believe these will help me create a path to building projects that have been weighing heavy in my heart for quite some time. Some of these topics relate to one another, others are just topics I have found trending on multiple slack channels I belong to, which sound interesting. Some even will help me sharpen my cultural awareness.

]]>
Helpful Git Commands http://wp.ebislab.com/helpful-git-commands/ Wed, 05 Dec 2018 10:25:12 +0000 http://wp.ebislab.com/?p=566 Here are some git commands that I’ve used on my projects to make me look like  I knew what I was doing, when in reality….I was winging it.

This command reverts back to the cleanest canvas (the most working version) and delete any unwanted dependencies which will update the remote repo.

git reset --hard CommitId && git clean -f

and then

git push -f

 

This command helped me know which commit to revert to

git log --oneline

 

]]>
Sound frequency modification with javascript http://wp.ebislab.com/soundfrequencywithjavascript/ Sun, 21 Oct 2018 14:18:43 +0000 https://themify.me/demo/themes/ultra-portfolio/?p=28

About 3 months ago, I was listening to a podcast by Tariq Nasheed on the concept of sound frequency, and I hadn’t noticed till now, but I my mood is definetely affected by certain sounds and bases…(probably why I am very much attracted to trap music)

While studying for my certification, I revisited one of my favorite songs from one of the OG hip hop korean groups “Epic High” called Ignition. Funny thing is, I don’t remember the tempo being so fast. Though it was just as beautiful as I heard it the first time, I knew something was off. Scouting around the big Y web, all I could find was the same videos with the same tempo. Maybe my brain interpreted it a whole different way, or maybe I so badly wanted it to soothe my already hectic life and needed it to be slower. On youtube you have the option to slow down or speed up your desired video, but what happens when your desired speed falls between the listed speed?

So, with the power of javascript here is what I did:

On chrome, I loaded up the video page, opened up the Dev console and threw the following code in

document.getElementsByTagName(“video”)[0].playbackRate = x

My chosen variable for x is .875.

It only works for that particular video in that session. So if you refresh it, it will return back to normal.

]]>
Expanding on my passions http://wp.ebislab.com/perfect-lens/ Sat, 20 Oct 2018 14:20:57 +0000 https://themify.me/demo/themes/ultra-portfolio/?p=31

I spent this year participating in a front end web developer nano degree program sponsored by google and udacity. Even though I had alot going on in my life to even pay attention to what I was doing, I realized that it was indeed something I really liked, and I would have been really great in if I put my mind to it.

To be honest, I didn’t care much in completing it, but once Udacity announced that if we finished the first phase by a certain deadline, we would have a chance to be flown out to Cali for Google I/O event, that definetely sparked my interest to get it done. I didn’t get to complete the first phase by the deadline, so I did not qualify to be one of the lucky few to go to the event, but I was already 3/4 of the way through so why not finish it through.. or at least, attempt it.

Udacity was going to award approximately 5-10 thousand students the opportunity take the full nano degree, and because of my pride getting hurt on the first round, I thought “maybe, I’ll actually have a shot, even though I still don’t know squat.” And truth be told, I was actually very happy on how much I’ve expanded on my knowledge of css and html. As for javascript? I was avoiding it like a plague. I completed the program on time, with a few days to spare. After I finished, I told myself.  I’m done.

Then I received an email. A congratulations, you made it to the full degree email.

I was… shookethethhhhhh … I honestly did not plan on continuing, in fact, my summer was already planned with 3 months of back to back weekend trips.

Where was I going to find the time to get all the work completed?

When I had some spare time , I read all of the students’ testimonials, some made it through the next round, some where genuinely disappointed. I remember reading a student’s post on how terrible they felt because its as if the greatest opportunity was at an arm’s reach and they let it slip away. Agh… the feels!
I actually was going to send an email to the udacity’s support reps to take me off the list and give it to the person, but once again, sleep evaded me, I fell asleep and I forgot to do it.

By the time I realized, spring sped on through, and summer was here, and like I had planned, my weekends were packed full of trips, family obligations and just living my life. At the back of my mind though, I felt that maybe, I should look into this Udacity thing…”it’s not everyday that you get a scholarship opportunity, and here you are… wasting it…”. And you know what I did?

I went on and continued living my life.

Meanwhile, all of this “busy-ness” was as a direct result from my abusive work life. I hated my job and every single day I wished that I was run over by a truck or something. In late June-early- July, I partook on a retreat that  made me realize how empty my life has been and realized that all along I have been suffering from depression, and the only way I could remedy it was to run away every weekend to wherever land. When I came home each time the depression would intensify, and when I went away, it wouldnt fully disappear, but I had some relief.

After vacation season was over, I realized that I had to change my job, the main culprit of my depression… because if I didn’t, I probably wouldnt live to see the next year. But, where would I go? I’m not fully skilled. I don’t know anything, who would take me seriously? I’m worthless.

I spent the rest of july to mid august everyday after work, just staring at a wall as I sat on my bed. I just literally stood still. For the first time in my life, I just stood there at peace and had a conversation with myself.

These are the actual conversations I had with myself:

“Right now, you’re failing in school because your job is taking up your time, and your job is being abusive to you, and when you get home instead of doing your school work, you’re exhausted, you stress eat your depression away, and you have no self control… and the cycle repeats. Right now you can’t take 2 classes because you’ve taken them 3 times each, and you need to transfer to the more expensive university to retake those classes, but who’s to say you’re going to pass those classes, because once again your job won’t let you be great. You need to focus on something… something temporary that will at least allow you to get out of where you’re at, and go somewhere else… that will nurture you, and you will allow you to work what youre studying… but is this even possible?”

That evening, I decided to check my email to pay for my overdue at&t bill, and somehow it’s as if fate knew I needed a lil boost, Brenda from Udacity reached out with compassion and left some slack resources to get me started… if I wanted to get back in…and then I realized.

“This is the sign! You shall finish this! And at the end you can put these self doubts behind you”

That moment I allowed myself to be led by the little voice in the back of my head acting as the drill sergeant. She started as a tiny voice, as the days went by the voice grew louder and domineering to the point it started to feel like she was a separate entity but in my head for some reason. (im not crazy! I’ve been tested! )

First thing’s first. Disconnect from social media. No phone calls after working hours, heck, divert all important phone calls to your work phone and no phone calls after 5 pm. Third you will live and breathe this material every day for the next 8 weeks (I had 8 weeks left before the program ended). Sleep? What’s that, get up, no time for sleep! Practice being social, hit up some people for help. IDGAF if you dont know them, type help… heck, private message them, youtube, get help, and repeat.

Everyday felt like I was on bootcamp. Got home, went straight to the computer and started doing my work until my body got tired and fell asleep around 8-ish, then work up around 1-2 am and continued studying until 8 am in the morning where I quickly showered and went to work. As the course work itensified, my thirst for knowledge grew stronger, I started doing my course work at work when I could fit it. If I couldn’t, I made sure to seek out help in the morning from the slack community and the mentors, I would play around with some of the code snippets on chrome, and as soon as I got home and dropped my bags, I would plop in front of the computer and test out what I had played around with in the morning. Some days were pure misery as I felt I had wasted it on a concept that wasn’t working even though I researched it and made theoretical sense in my head. I spent alot of days like that, just waiting and waiting, and testing. Thank God for the mentors.

Udacity decided to pull a “you guys are working so hard, we’ll extend this for an extra 3 weeks because we believe in you”.  As generous as that was, I was using full force to finish it by the original deadline, because knowing the type of person I am, procrastination and is my greatest vice.

I finished the program in 9 weeks and 5 days. 5 days after the original due date , and I actually passively started a week before my second project in which I used to  kick off the project.

If I could go back and start this all over again, I’d join the 100daysofcode challenge and spend at most an hour a day from when the project started.

I’d dedicate 1-4 hours of my free time on the weekend playing around with it

And I’d definitely write a blog about it to keep everything documented.

 

]]>
How to deploy static site in Heroku http://wp.ebislab.com/herokusite/ Fri, 19 Oct 2018 14:21:39 +0000 https://themify.me/demo/themes/ultra-portfolio/?p=33

I would like to thank Stephen Chavez from my Grow with Google Nanodegree program for walking me through this. When I was researching how to deploy this static site to Heroku I got alot of complicated results, and all of them that I could find were published from students from the MWS track. Had me questioning wether I even learned anything while creating this project. Stephen walked me through his process, and that’s when we both realized that we had different versions of the project. FEND students’ objective was to make this as responsive to different displays and make it screen reader ready as well as enabling the service worker functionality. Whereas MWS students objective was focused on making it functional with the database backend, on top of what making it fancy and enabling service worker functionality as well.

After tinkling around, we came up with this:

  1. Create a package.json on the root directory that has npm support. Make sure it has
    "start": "node server.js"
  2. Create a server.js
  3. Deploy/Update your project onto github
  4. Create an Heroku account
  5. Create a new server and connect your GitHub repository in it.

If you get an error

  1. run the cmd node server.js in the same folder server.js is in by typing:
    node server.js
  2. run npm i express
  3. do node server.js again
  4. run npm i cors
  5. run node server.js
  6. I got a working on 80
  7. push it

I got some visuals, but for some reason the venues were not displaying. Remember server. js just serves the files to somebody
the browswer runs the code and the code makes a request at that address at port 8080, but there isnt anything at localhost.
When inspecting it in on the console I was getting localhost:8000/data/restaurants.json:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
I would create a new branch to deploy on github , so that I can refer back to the master branch on my local machine if I need to make edits in the future.

  1. So open up DBHelper.js
    1. Look for this line
      static get DATABASE_URL() {
      const port = 8000 // Change this to your server port
      return `http://localhost:${port}/data/restaurants.json`;
      }
    2. Replace it with
      static get DATABASE_URL() {
      let dataURL = "";
      if (location.protocol.indexOf("https") !== -1) {
      dataURL = `https://[your server url].herokuapp.com/data/restaurants.json`;
      } else {
      dataURL = `http://[your server url].herokuapp.com/data/restaurants.json`;
      }
      return dataURL;
      }

Make sure your service worker cache is cleared to  make sure you can see your changes on your site. It’s a frustrating process that cannot be omitted.

]]>