Git Reset Demystified: How to Restore Your Working Directory to Match the Master Remote Branch Exactly

Quick little tutorial here, mostly for my own personal reference, on how to restore your local working directory to match a remote master branch. Take this scenario for instance, you’re working on a project for work, maybe as a junior developer working on your first professional project, and you make a bunch of changes to your working directory that you want to throw away, and restore your project to match the remote master branch. Here are your four magic commands:

$ git checkout master

$ git fetch origin

$ git reset --hard origin/master

$ git clean -df

Similarly, if you want your local working directory running on your personal computer to match a different remote branch other than master, you can run something like:

$ git checkout users/myusername/myfeaturebranch

$ git fetch origin

$ git reset --hard origin/users/myusername/myfeaturebranch

$ git clean -df


[SOLVED] Amazon Fire TV Stick Web App Tester Displaying a Black Screen

Hopefully someone will find this blog post extremely helpful. Tonight I purchased an Amazon Fire TV Stick with the intention of building a cool new React app for the Fire Stick. My hacking session started off well, but I soon ran into an awful bug where my Fire Stick would continually display nothing but a black screen for my React app when using the Web App Tester.

Well after two hours of struggling with this issue, I discovered the solution to this problem: You cannot use a white background color when developing HTML5 apps for Fire TV Stick. All I had to do to get my app to start working was change the background color to purple!

When starting a new project developers tend to start with a blank canvas and a little black text, but this will not work on the Fire TV Stick. So if you find yourself running into a similar problem where you just can’t get your Fire Stick to display your Hosted HTML5 app using the Web App Tester, try changing your background color to something other than white.


Problems with the Google Cast SDK, Custom Receivers, and the YouTube Player API

I’ve been struggling the past couple of days experimenting with the Google Cast SDK in an attempt to create a new mobile app where users can “stumble upon” new YouTube videos and cast them to their televisions using Chromecast. However, I’ve run into a couple of big problems and would like to share what I’ve learned:

  1. The YouTube Player API for mobile apps isn’t compatible with the Google Cast SDK. If you want to show a YouTube video in a mobile app, the YouTube Player API works great. If you want to cast a video from your mobile app to a Chromecast, the Google Cast SDK works great as long as the video is hosted on your own servers. But if you want to cast a YouTube video from your mobile app using the Google Cast SDK + YouTube Player API, you are out of luck!
  2. Chromecast does play nicely however with anything you want to cast from a web browser running on a desktop or laptop computer. I didn’t run into any problems trying to “cast a tab” using YouTube embeds from my desktop or laptop computer.
  3. The last lesson I learned from experimenting with the Google Cast SDK is that Custom Receiver applications don’t seem to work. I’m sure someone out there has been able to get a Custom Receiver to work, but I personally was not. I am assuming that most people who are building apps which are capable of casting video to Chromecasts are using Styled Media Receivers. I did quite a bit of experimentation over the past few days and never ran into trouble using Styled Media Receivers (receiver apps hosted by Google), but I absolutely couldn’t get a Custom Receiver to work at all.

So there you have it! You can’t cast YouTube videos embedded in mobile apps. You can easily cast YouTube videos embedded in websites on desktop and laptop computers. And Custom Receivers for Chromecast don’t work, use Styled Media Receivers instead.


Surf with Swayze Privacy Policy

Privacy Policy

Your privacy is important to me. It is  my (Christopher Pedersen) policy to respect your privacy regarding any information I may collect from you on my app, Surf with Swayze.

I only ask for personal information when we truly need it to provide a service to you. I collect it by fair and lawful means, with your knowledge and consent. I also let you know why I am collecting it and how it will be used.

I only retain collected information for as long as necessary to provide you with your requested service. What data I store, I will protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.
I don’t share any personally identifying information publicly or with third-parties, except when required to by law.

My app may link to external sites that I do not operate. Please be aware that I have no control over the content and practices of these sites, and cannot accept responsibility or liability for their respective privacy policies.

You are free to refuse our request for your personal information, with the understanding that I may be unable to provide you with some of your desired services.

Your continued use of my app will be regarded as acceptance of our practices around privacy and personal information. If you have any questions about how I handle user data and personal information, feel free to contact me (

This policy is effective as of 4 August 2020.


Surf with Swayze Terms of Service

Terms of Service

1. Terms

By accessing the app “Surf with Swayze,” you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained on the Surf with Swayze app are protected by applicable copyright and trademark law.

2. Use License

  1. Permission is granted to temporarily download one copy of the materials (information or software) on Christopher Pedersen’s app for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:
    1. modify or copy the materials;
    2. use the materials for any commercial purpose, or for any public display (commercial or non-commercial);
    3. attempt to decompile or reverse engineer any software contained on Christopher Pedersen’s app;
    4. remove any copyright or other proprietary notations from the materials; or
    5. transfer the materials to another person or “mirror” the materials on any other server.
  2. This license shall automatically terminate if you violate any of these restrictions and may be terminated by Christopher Pedersen at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.

3. Disclaimer

  1. The materials on Christopher Pedersen’s app are provided on an ‘as is’ basis. Christopher Pedersen makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.
  2. Further, Christopher Pedersen does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its app or otherwise relating to such materials or on any sites linked to this site.

4. Limitations

In no event shall Christopher Pedersen or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Christopher Pedersen’s app, even if Christopher Pedersen or a Christopher Pedersen authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.

5. Accuracy of materials

The materials appearing on Christopher Pedersen’s app could include technical, typographical, or photographic errors. Christopher Pedersen does not warrant that any of the materials on its website are accurate, complete or current. Christopher Pedersen may make changes to the materials contained on its app at any time without notice. However Christopher Pedersen does not make any commitment to update the materials.

6. Links

Christopher Pedersen has not reviewed all of the sites linked to its app and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Christopher Pedersen of the site. Use of any such linked app is at the user’s own risk.

7. Modifications

Christopher Pedersen may revise these terms of service for its app at any time without notice. By using this app you are agreeing to be bound by the then current version of these terms of service.

8. Governing Law

These terms and conditions are governed by and construed in accordance with the laws of TX and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.


Failed authorization procedure. (http-01): urn:ietf:params:acme:error:dns :: No valid IP addresses found

Having some trouble using Certbot to install an SSL certificate for your website? Getting hit with an error message that looks something like?:

Failed authorization procedure. (http-01): urn:ietf:params:acme:error:dns :: No valid IP addresses found for


The following errors were reported by the server:

Type: None
Detail: No valid IP addresses found for

Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.

Okay, so here’s what’s probably going on: You just bought your domain name, set your nameservers, uploaded a landing page to your server etc., then wham! Certbot just doesn’t want to add that little https to your URL. The issue may be that your newly registered domain name hasn’t propagated through the internet’s DNS registry yet so Certbot is having a hard time finding the corresponding IP Address for your new domain.

The solution? Just give GoDaddy or whoever else you used to register your domain a little more time update everything and try running Certbot again.

If you’d like to test this hypothesis out, try visiting your new domain through Google Chrome AND Mozilla Firefox AND/OR Apple Safari. I found that while Google Chrome could not find my new domain, Firefox found the new domain easily and displayed my placeholder landing page just fine, albeit with an “unsecure” icon indicating that the site had not yet been secured with an SSL certificate. Likewise, it appears Certbot itself can’t find the newly registered domain either, just like Google Chrome. If you happen to have multiple browsers, try visiting your domain from different browsers to see if you can duplicate what I’ve described above. If you find that your website isn’t showing up yet, give your registrar and the World Wide Web a little time to process things and try again.


The file tsc.ps1 is not digitally signed. You cannot run this script on the current system…

Run into the following bug trying to get TypeScript up and running in VSCode on your Windows machine?

The file tsc.ps1 is not digitally signed. You cannot run this script on the
current system. For more information about running scripts and setting execution policy, see
about_Execution_Policies at https:/

Okay so here’s the deal. You probably installed the TypeScript compiler using the Windows Command Prompt or possibly the built-in PowerShell terminal from within VSCode. Installing TypeScript using the Command Prompt or the built-in terminal in VSCode will both cause your system to throw the nasty error above when you actually attempt to start using the TypeScript compiler.

Okay so… then what do we need to do? Well here’s your answer:

First, uninstall TypeScript.

$ npm uninstall -g typescript

Next, open up the Windows PowerShell (not the built-in PowerShell in VSCode) making sure to run the program as an administrator. If you don’t know how to do this, search for “PowerShell” in the search bar next to the Windows Start Button in the lower left and corner of your screen. Then right-click on “Windows PowerShell” and select “Run as administrator”. From the Windows PowerShell, you can now re-install TypeScript with administrator privileges which will fix the permissions related bug mentioned above.

$ npm install -g typescript

Now go ahead and re-open your TypeScript project in VSCode and compile it like normal, and everything should work A-okay 👌.


Hello, World in Django: My Quickstart/Cheatsheet for Getting Up and Running with Django on Windows

Getting to hello, world in Django is kind of a pain. If you find yourself having some trouble getting up and running on your Windows machine and want to get to “hello, world” as quickly as possible, I hope you find my cheat sheet below helpful. This isn’t really tutorial. For that, I suggest going through the official Django Polls App Tutorial. However, if you just want a quick reference for the future, this is the guide for you!

$ cd Desktop
$ mkdir HelloDjango
$ cd HelloDjango
// Create Virtual Environment with Python's venv
$ python -m venv env
// Activate the Virtual Environment (Windows)
$ env\Scripts\activate
// Install Django
(env) $ python -m pip install Django
// Create / Update requirements.txt File
(env) $ pip freeze > requirements.txt
// Running someone else's Django App?
// See below how to install dependencies from requirements.txt file...
(env) $ pip install -r requirements.txt
// Create Django Project (Project Can Contain Many Apps)
(env) $ django-admin startproject hellodjango
// Run Django Development Server
(env) $ python runserver
// Create Django App
(env) $ cd hellodjango
(env) $ python startapp hellodjangoapp
// Connect new "App" to Project
Open the file under the hellodjango directory,
and add hellodjangoapp.apps.HellodjangoappConfig to INSTALLED_APPS
# Application definition
// Add your first view (hello, world) to hellodjangoapp/
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("hello, world")
// Create your app's file (will also need to update project after this)
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
// Now update your project's file (notice updated import statements)
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('', include('hellodjangoapp.urls')),
// Run development server (run from hellodjango directory)
(env) $ cd hellodjango
(env) $ python runserver
// Now visit in your web browser to see your hello, world in action
// NOTE: Apparently Django will create your requirements.txt file for you
// the first time you run the development server, so the requirements.txt
// code above is likely NOT necessary, consider removing from instructions.
view raw HelloDjango.txt hosted with ❤ by GitHub

How to Contribute Code to Someone Else’s GitHub Repo

Having trouble figuring out how to contribute code to someone else’s GitHub repo? Git can be quite complicated, so there’s no wonder why you might be having trouble with this. In fact, I found myself today struggling with this same issue attempting to contribute to an open source project for the first time. Thus, here I am writing this post, more or less for my own personal reference. So without further ado… How to Contribute Code to Someone Else’s GitHub Repo

First, you are going to want to fork the other user’s project. This is not intuitive at all. One would think that simply cloning the users project to your local machine and submitting changes from your local project would make the most sense, but this simply isn’t how it’s done. You are going to want to press the “fork” button on the other user’s page to get started. This is your first step.

Next, when you are ready to start working on your new feature or contribution, it’s time to create a “feature branch” which you will be using to develop your new feature or contribution. We’ll start by cloning your recently created fork to your local machine:

$ git clone

Now let’s create the new branch:

$ git checkout -b my-feature-branch

After creating your new branch, make some changes to the code on your local machine remembering to hit the “save” button in your text editor or IDE. After saving your changes, let’s stage, commit, and push your changes to your forked GitHub repository:

$ git stage .

$ git commit -m "my first open source commit"

$ git push origin my-feature-branch

Now that we’ve pushed our work to the feature branch of our forked GitHub repository, we can push the “submit pull request” button on to contribute our code to the other user’s GitHub repository. Note, we will be contributing the code from my-feature-branch on our forked repository over to the master branch of the other user’s repository. This is the default setting whenever you push the “submit pull request” button from a forked repository on GitHub assumes you are wishing to submit the pull request to the original repository which you forked.

Assuming that the other user accepts our pull request, now we will need to sync our forked repo once again with the other user’s repo. This is another one of those not-obvious quirks that I found hard to grasp at first. Once we submit a pull request from a feature branch to the other user’s master branch, our master branch on our fork will actually be out of sync with the other users master branch. So this last little gem here will let us get everything back in sync:

(Configure a remote for fork)

$ git remote add upstream

(Sync Forked Master Branch with Other User’s Master Branch)

$ git checkout master

$ git merge upstream/master

Now everything should all be in-sync. To contribute more code simply go back to step one, create a new feature branch (with a different name) and repeat the steps above.


Blocked, Banned, or Suspended by AngelList? Use Crunchbase PRO Instead

(Loose) Transcription of Episode 35 of Misadventures in Startups

[Please don’t actually read this blog post, watch the video above!]

I just included a transcription here on the blog so Google might send a little traffic my way. But if you insist…

Welcome back internet friends! Topher Pedersen here, again with more misadventures in startups. Today, I want to talk about getting blocked, banned or suspended from AngelList. AngelList— a whole lot of hype around AngelList. You’re always seeing Naval Ravikant everywhere. He was on Joe Rogan’s podcast last year. So if you’re into startups and you’re watching this video, Obviously you’re like, “Hey, how do I get into AngelList? How do I do this stuff?” And you’re on there trying to raise some money. Maybe you’ve been doing a little research and you’ve send your first messages to some angel investors and… WHAM! You get blocked, banned, suspended!

So what’s the deal with that? All right, well here’s the thing: AngelList is not for you.

AngelList, despite how they market themselves as you know, democratizing venture capital, etc. etc. is not really for you. It’s actually quite elitist.

What I mean by that is it’s not elitist in a racial or socio-economic background kind of way. But it is really is about who you know. It’s NOT about what you know. Very cliché saying, but that’s honestly how AngelList operates.

So I’m assuming that if you’re reading this blog post, that this has happened to you: You signed up for AngelList, you made a profile, and then were like now what? What do I do now? It’s very much like early Facebook back in 2005 – 2006. Back then If you signed up for Facebook, you really just had a profile. There wasn’t a whole lot, other than that, and you could like send messages but that was about it. And that’s very much what AngelList is like today. You make a profile for your startup and you can message investors. But the search functionality on AngelList is not really very good. The only thing you can really do is see who your direct connections are, and maybe friends of friends (secondary connections). But if you’re like myself, and you don’t live in Silicon Valley, you don’t work for a Silicon Valley company as an engineer, you’re not friends with other Silicon Valley engineers or angel investors: You’re not going to have any connections.

And that’s kind how AngelList is designed. It’s all built around connections. So it’s really an insiders game. Now… You don’t have to be like a super-insider; you just have to be someone who’s in Silicon Valley and working as an engineer and have some sort of small social network of friends that are on AngelList. So in that case, you might meet some people and possibly raise money. But if you’re like myself, and you’re outside of Silicon Valley, you don’t have any connections, and you kind of just start cold emailing people— There’s a good chance that you will get blocked banned or suspended from AngelList once you start trying to reach out to investors.

Take my case for instance: I think there’s two reasons why I may have been blocked. Like I said, AngelList’s search functionality is not really very good. And you’ll notice if you try to just look at your connections, or everyone, AngelList’s search results will return tons of people that have just made one angel investment. And maybe that’d be fine if they made the angel investment recently, but you have no idea when they made that one angel investment, it could have been 10 years ago. For example, when searching for angel investors here in Texas the search results returned 16,000 results! or something crazy. How do you sort through all of that to find the real angel investors who are actively searching for deals and investing in companies regularly?

The solution that I found is to use Google. I came up with a pretty good search query that did the trick fairly well:


And then if you want to take it up a notch, you can start adding in the number of deals into your search queries…



And so on and so on, from 1 to 250.

I entered these search queries into Google manually by hand, but it probably would’ve been easier as a bot. Even so, Google actually flagged me as a bot a few times. I had to do the captcha thing to prove I wasn’t a robot. After spending a night doing this research, I discovered some interesting stuff:

I found there are 1,474 investors that have made between one and nine investments.

245 investors that have made 10 to 19 investments.

94 investors have done 20 to 29 investments.

102 investors have done 30 to 49 investments.

90 investors have done 50 to 99 investments.

62 investors have done between 100 and 199 investments.

9 investors have done between 200 and 250 investments.

And there are a few people that have done even more than that!

Now I did not actually compile this list and publish it. I know angel would probably not want me doing that. So it kind of just kept it to myself. But my plan was now that I kind of know how many investors there are, and how many deals they happen to do: Who do I want to target?

I found it was really hard to track time frequency of investment, but total number of investments was kind of the best that I was able to personally figure out. And I wasn’t even able to do it through AngelList’s website. Like I said, I had to do it through Google! So that could be one reason that I got blocked. Maybe AngelList just saw that there was a ton of traffic coming from my computer. I was browsing their site pretty heavily. So maybe CloudFlare maybe like flagged my IP address. So that could be one reason that I got blocked.

I also sent 11 cold messages to investors on the site over two days. So maybe an investor on the site flagged me as a spammer? Whatever the reason… Bam! Blocked! Suspended! Do not pass go. Do not collect angel investment.

I know there’s tons of hype behind AngelList. If you follow the startup world/eco-system it’s easy to get caught up in the hype. You have this feeling like, “Oh, I need to be on AngelList!” But what do you do after signing up and creating a profile? Now what? What do I do? Wait? Well, here’s my recommendation: You don’t need AngelList. AngelList isn’t for you anyway.

But you know what solution there is that IS for you… Crunchbase!

If you haven’t heard of Crunchbase, Crunchbase is website and database created by Mike Harrington of TechCrunch fame. I think it started out as a database of startups. But now also includes a database of investors as well. And they cover all different stages of investments. But what you are going to want to search for, if you have an early stage startup, are investors that are doing pre-seed and seed stage investing.

I’ve had a Crunchbase subscription for a while now, just out of interest, so can kind of see what’s going on. Who’s raising money? Who are the active investors? Etc. etc. But what I was trying to use AngelList for, identifying potential investors, I’ve found you can do really easily on Crunchbase.

So that’s my solution to you if you’ve been blocked, banned, or suspended by AngelList. Just go try Crunchbase instead. It does cost $300 a year. So if you don’t have $300 to spend on something like that, then maybe don’t do it. But if you can spare the $300 I would recommend it.

It’s not a must have. It’s just a tool that’s out there. I’m sure it costs them money to maintain their database. So if you want to check it out, head over to The product is called Crunchbase PRO. The only big difference between Crunchbase and AngelList is that it mainly lists funds, not individual angel investors. But like I said, there are tons of pre-seed and seed stage funds on there investing in the same stage startups as the angel investors over on AngelList.

And one of the cool things is that they’re actually putting in a lot more money than the individual angel investors. They’re not putting in $25,000 checks. They’re doing like $2 million seed deals!

For a company like mine where I don’t have very much traction, I don’t think I’d be able to raise something crazy like $2 million. But there are some funds doing much smaller deals as well. So it’s worth checking out in my opinion even if you aren’t trying to raise seven figures.

Well that’s the end of my rant internet friend. Crunchbase is better than AngelList. The end.