Chad Krause

A small blog about my projects

How To Broach In Fusion 360
How to linear broach in Fusion 360

Quick Warning: Crypto Mining Sites!

Have you been mining for other people?

I stumbled upon a site today while looking up a tutorial. This site immediatly used 600% of my CPU (6 threads at 100%) and was making my fans go crazy.

I paused Javascript execution and saw that there seemed to be a crypto miner in the background.

I thought this was particularly terrible because it's a tutorial so there is a great chance that I would keep that tab open for a while.

Here is the code I saw that led me to believe there was crypto miners:

Some encoded javascript and webassembly. There is no reason to have any of them. Also, I found some jav...

Chad's URL Shortener Part 4 - Done for a bit

Front End Time

4/7/2018 2:00PM

I chose Angular. I use material design most of the time but I want to change things up. I will use PrimeNG for my UI because I want to try something new.

Here's the plan:

  1. Make a simple simple simple front page. You paste the link, I give you shorter link. Single page only.
  2. Make about us page (eventually)
  3. Make statistics page. PrimeNG makes it easy to display graphs so why not? You paste my link, and I'll show you the statistics.

Will this site be popular? Absolutely not. I will be shocked if anyone uses it besides me. But it will be cool, and I need something t...

Chad's URL Shortener Part 3 - Meat & Bones

4/2/2018 1:00PM

What have I done so far, code wise?

  • Designed database
  • Wrote migrations

I'm going to avoid making this a How-To and more of just sprawl of my thoughts

4/2/2018 4:00PM

I have done some more work:

  • Created models for my database
  • Created and connected database to project
  • Made RedirectController
  • New Log table for short codes that aren't valid

So far, if you go to a vaild short code, it will return some JSON that includes the model for the URL and the IPAddress:

        "id": 1,
        "url": "",
        "short_code": "chad...

Chad's URL Shortener Part 2 - Database and Project Setup

So now it's time to get to some code. However, some planning is required. How is this database going to look?

I have 3 tables in mind so far:

  • urls and their shortened code
  • clicks and user information
  • IP Address - to save on database space

For now, it looks like this:

Starting the project

Like I said in the intro, I am going to use laravel. I created a new project, now I need to make a database migration:

php artisan make:migration inital_schema

And I need to fill it in. Note that it's not exact because I'm still learning.

class InitalSchema extends Migration
     * Run the migrati...