July 15, 2018 I have a desktop computer I’ve built back when I was in college, and it’s been nothing but awesome. A couple of months back I used it so that I can log in through ssh using a couple of neat programs. I set this up, and I thought it was the coolest thing ever.
Suppose you’re in Thailand, and you want to be able to login to your GPU’d desktop. You can! But you just have to make sure you login using Linux… Yesterday, I tried to login from a local library to play around with some machine learning. There’s a dataset I’m looking at, and it’s >10 GB! There’s no way my puny laptop can handle that much processing. It’ll heat up.
Anyhoo, I tried it again after I haven’t used the GPUs in a while, since I’ve been up to making an Electron app, among other things. I tried to do it again and I was just so last.
After hours of fumbling around, and reading a bit more on the actual topic, I was able to get it working again. Last time, I wanted to write a post for myself and posterity, but never got around to it. But I’m going to do it this time!
Approach
First, I’ll explore the theory behind each broad strokes procedures in diagram form(as pictures are worth a thousand words) then I’m going to do the entire procedure on my laptop with another computer being the server, and put screenshots and commands in step by step.
Part One: Setting up No-IP
Part Two: SSH
Part A: Session Key Establishment
We don’t do any work on this, the ssh program does all of this for us. But I decided to read a little on it anyways and made this diagram, which will be revised if I get around to recalling all the actual details from my undergraduate days…
.png)
Part B: Authentication
To make sure that’ we know we’re making contact with the appropriate party, after the session key is established, you can login with userid and password. In lieu of the password, you can generate what’s called a public-private key pair.What’s nice about this is that you don’t have to type those dank passwords and get error messages and crap. You just log in.
Public Private Keypair
To do this, you generate a public private key pair. The rule is: you keep private key yourself, but are free to share the public key with anyone.
You can encrypt a message with a public key, and only decrypt with a private key. Example:
.png)SSH Authentication
Now this part is the most relevant for our setup. I’ll try to number the steps, and afterwards, go on my computers and document the steps required.png)
Application
Finally, this is where the real fun starts.
-
Because the IP provider doesn’t give us a permanent address, it could change at anytime. We need an intermediary to send our ip address, and this intermediary needs to reroute the IP address back to the requester. It kind of looks like this:[Picture to be added later]
-
To do this, we need a service to constantly update the IP that our internet service provider feeds us. For this, we can use a service called No-IP(https://www.noip.com/). Make an account, and create a hostname:

Alternatively, you can get a Hostname and domain if your router provides you one. for my router, Netgear allows me to have a separate Dynamic DNS Service name, which is described in the section below.
-
You also need to setup your router configurations:
A. For this, I went to my routerlogin.net -> went to advanced-> advanced setup, and opened up port 22 for ssh. TCP/IP ports(if I recall correctly, for this I went to my router’s webpage routerlogin.net, went to advanced and filled out the necessary details)
B. Optionally, you can setup the hostname under the router company’s sub-domain name instead of using one from no-ip (which has restrictions on the number of DNS routings, and unintuitive domain names).

-
Download and install the software on the server for no-ip. This is used to ping the no-ip DNS servers and update the entry to point to the local ip address. Follow the instruction here: https://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client-on-ubuntu/
Below are the commands to install and update the client:
-
Install ssh authentication for your server. That way, you’ll be able to login without specifying the password. First, you want to generate a public and private key pair on the client machine:
ssh-keygen #generate client key
cd ~/.ssh

-
Next, if you’re on a mac, add the private key to your keychain. I’d imagine you’d have to do some command to add the private key to your ssh-client, depending on your operating system.
ssh-add -K battlestation
You must do this EVERY time you restart the machine, since you have to load the key into memory. It may be good to just put it in your .bashrc file so you don’t have to remember to do so.
-
You have to then transfer the public key into your server. This can be done using a flash drive, a secure storage service, or login directly to the user with password, and then transferring the public key: I think this instruction is a good one(https://www.linode.com/docs/security/authentication/use-public-key-authentication-with-ssh/), but I used a flash drive to transfer battlestation.pub into my server computer.
-
Next, add the public key to your ssh server.
cat battlestation.pub >> .ssh/authorized_keys
Finally, start the ssh server. On your server(additional instructions: http://ubuntuhandbook.org/index.php/2016/04/enable-ssh-ubuntu-16-04-lts/
sudo /etc/init.d/ssh start
sudo service ssh restart
-
Modify your ~/.ssh config to include your new domain. For example: mynewdomain.mynetgear.com
Host bs
UseKeychain yes
AddKeysToAgent yes
Hostname yoursubdomainname.mynetgear.com
User me
IdentityFile ~/.ssh/battlestation
-
also remember to clean our your known_hosts file in .ssh, if you’ve attempted this more than once and have unclean known__hosts file:
ssh-keygen -R hostname
-
Finally, I was able to login! Now I’m able to login to my desktop to do machine learning on anywhere in the world!
References
July 04, 2018 My family spent the fourth of July trying to get a new used car for my mom. She’s been driving a 250k miled Toyota
Corolla. The car had to go. We shopped today, and I deeply regret doing this. Sigh. I was an idiot. Worst time to buy, because everyone
takes this day off. I’m not going to buy crap on the Fourth anymore. It really does disservice to the great people who built America from scratch. Next time I’m staying home, and thinking about the great men who had balls to call out wrong doings and start perhaps the greatest startup the world has ever seen. Respect
But the process of finding a used car is so painful. At a certain point, I began to calculate the total amount of time
that my brother and I put in reading all of the disparate sources of information, and it seems like we’re getting to
the threshold where the wages we lost Googling around is becoming unreasonable.
The whole industry is so broken. I firmly believe that the car dealing industry, well the majority, is out to screw customers.
Without further ado, here is my rant bullets.
- The asymmetric amount of information between the dealer and the customer.
The dealer sells tons of vehicles every month, so
they have a unfair advantage over the customer. They know the lowest they can go - they know how long the car has been in their inventory, and
unless you know about cars like the back of your hand, they may just slide some flaws over you and pull wool over your eyes.
When I went to a dealership that had cheaper cars, there were all sort of red flags on their cars. One of the cars failed their inspection.
Another one got into an accident marked as minor on top of the CarFax, but the description didn’t match the “minor” accident.
One failed the safety inspection, and upon reinspection it passed. When asked about this issue, they said the windshield was broken. But if the car hasn’t been in an accident or some issue, why would the windshield be broken?
- Reviews on websites are not normally distributed. Or they don’t follow a good distribution. Honestly, a 4.7 star rating doesn’t really mean anything if we don’t understand about the people who write them. And people are lazy. Including me. If things go well, they don’t write a review. So either things have to be really good, or really bad for the customers to write these reviews. So I don’t know if the reviews are even a good idea to gauge whether a dealership is good or fair.
For example, one person, who doesn’t read the fine print, can think that they got a great deal on an extremely flawed car. Only three years later will they know that they’ve been screwed.
- There is no clear transparency on how car prices are generated.
According to this article, the professor who was in the article said many of the pricing tools are unreliable. This is true. I’m really beginning to think that unless kbb or all these car price estimators are run by the government or a non-profit(which they are not), it’s damn cartel. Total bullshit. First, they aggregate all the sales data from dealership data, but all the dealerships refuse to go down a certain price. Probably. So what is the point in doing this? Is the price even natural?
The only way to fix this is open source exactly how these companies calculate their prices, or have a government entity do it. But I think there are significant challenges to this.
(sidenote) Some of the low-quality dealerships I went to seem to be taking advantage of people with lower income. The first thing they always ask is what is your credit rating, and can you finance the vehicle? My brother and dad have financed cars in the past, and the interest rate is ridiculous. It leads me to wonder about what my former boss said. He said that as income increase, it’s not like people save. They buy more expensive things. Expensive cars on loan, and bigger houses. I hope these people know what they are doing. And shame on dealers for ridiculous predatory loans.
- Why the hell are UI for car dealerships so poorly designed for the mobile? It’s choppy, slow, and makes no sense to me. There’s significant delay in UI requests. We have React, Angular, and single page apps and responsive apps. I don’t even know why their UI experience makes me go nuts.
- Do dealers even give that much of a benefit to customers? Okay. In the era where there was no internet and easy access to information, sure the dealers were there to educate people about the features of the car and supposedly help customers find the car that they want. But nowadays, there are tons of information, videos, on the web. So what purpose do they do to help society at a large scale? Are they not middlemen? I think there are good middlemen that serve a purpose in the economy. These people probably reach out to customers to inform customers on new products. But for something like a car, I bet the first thing they do is to go to Google, and start typing queries and browsing the web on what car meets there criteria. I would like to know what the dealerships really do to reduce economic efficiencies at this point and make the car market liquid. Sure they store cars on their lot. But do you really need all those fancy offices and showy rooms for this I wonder…
Summary
At the end of the day, I don’t want a great deal. Okay. Great deals would be nice. But I want a fair deal. I know that selling cars is hard work, so I don’t want to completely negotiate and wear down the salesman. At the same time, I don’t want to be screwed and be a butt of all
dealer jokes.
July 04, 2018 If we had a reasonable curve of forgetful people on the x axis, and creativity
on the y axis, what would that curve look like? Assuming that we control for
all other variables.
In Machine Learning, there is a very effective technique known as drop out, where you turn off random neurons in a neural network to avoid the network becoming “stuck” or overfitting.
This technique works remarkably well that it’s used almost always in any kind of neural network to prevent overfitting.
Isn’t there a biological equivalent in our brains? Where certain neurons are not
making the connections when they are supposed to, so the brain can’t recall a specific
fact or memory.
By forgetting, you’re able to replace certain aspects of that memory or concept with new ones. For example, if a human was able to recall every single picture that has graced their eyes, then that would be a severe inhibitor to creating a new picture that is based off of what they’ve seen. If a person recalls every single instance of that picture at each brain tick, it would bar them from any kind of creative modifications to that original image.
In reverse, if the person forgot every single picture that has touched the back of their eyes,
they would be completely useless. Well, that’s effectively being blind. If we asked a person
to create art, would their art look reasonable?
I thought not but apparently there’s a blind painter from birth. And he’s good
But is he truly “blind”? All of his ancestors who have come before him, they all have done some engraving to this brain.
Even though he is blind, his ancestors were not, so I would believe that he has some sense of what the world should look like
and what colors are, even if he has never seen them before.
Painting is a blind man’s profession. He paints not what he sees, but what he feels, what he tells himself about what he has seen.
Anyhoo, I would like to know if forgetful people are more creative. Because I am quite forgetful. But I’m not sure that I’m that creative. I sure hope so. I want to believe that the world isn’t as unfair as we think it is. That everyone is given some sort of talent, that there are somethings people are inherently monsters at. That there are economic inefficiencies that prevent people from finding things to do that they love to do, and that everyone has some passion or talent - they never found out above it.
If I have to summarize, all people probably have a stat sheet like this, similar to Pokemon:

I realize that I may have gone a few tangents, but these days my thought is can be summarized as: You shouldn’t beat yourself
up for not being good at something, because there’s bound to be something else that would make up for that deficiency. So you forget everything. Maybe your hella creative!
July 02, 2018 The number one thing that coders must do, is write a darn explanation on the top of the file describing what the code is supposed to do. Even one line is better than nothing. Even one word is better than nothing.
In a rosy petal world, everyone would have the last modified date, some possible contact information for questions, and maybe even a nice function annotation for every single function. But we don’t live in such a world.
At the very least, they should describe the abstraction that led them to create this file.
It is late at night, and I’m trying to read some Python code to work on a machine learning project. And there are no comments.
But hey, at least the person didn’t use stupid variable names like a, b, and c. So I’ll be all right.
But I was hoping for a comment at the beginning of the file and I didn’t find any. I’m a little disappointed =(.
June 09, 2018 recently, github got acquired by microsoft. when i heard this news, it was a
complete curveball thrown out of nowhere.
the first thought that came to my mind was, “wtf???!!”
at first, i was disappointed. heh. another corporate sellout.
but as I read more news, i became less and less disappointed. i was frustrated
that Microsoft was going to screw over github, just like the way they did
with Skype. for common folks like us, it has all sorts of problems now.
for example, when i tried to talk to a good friend from japan, skype had a lot of issues.
and then, there was so many complaints online about how people’s private repositories were not safe anymore.
i became concerned too…
then i looked the computer that i was using.
windows…
needless to say, this was an unwarranted worry. microsoft owns so much software.
they have windows.
they have office.
they have azure.
and now github.
it’s crazy. and a bit scary. i mean, how can one corporate entity own so much?
if they wanted, they could snoop on almost every single person’s computer, and
collude with the government to give all sorts of people data.
if they wanted. maybe they already do. who knows.
and push comes to shove, if there is crazy proprietary code on github’s private
repositories, they would take a look. and try to incorporate new, novel ideas,
if it threatens their business.
to give an example, it’s like having a cookies on the table after a huge thanksgiving meail.
there is no way in hell you’re going to take another bite. you’re already full.
but soon or later, when all that food comes out the other end, you’re going to eat that cookie. maybe steal a chococlate chip or two.
so the question is: will i push my code to github?
so far, yes. i really don’t have anything novel or extremely valuable.
but on the off chance i work on a product that is a competing product against microsoft, no way jose.
not on github, or any other web service for that matter. they’d be easy to compromise…
now, do i blame github for selling out? not really. they’re not really a public good. the fact of the matter is,
venture capitalists and enough investors poured so much money into it, that this buyout was probably idael.
and now the founders have enough money to not work for the rest of their lives. can you blame them?
furthermore, there’s no way for us to know what their balance sheet looked like. maybe their burn rate was aggressively high, and they needed an exit plan real quick.
regardless, the selloff was pretty depressing. it got me to think: is there a way for anyone to build a distributed version on
a new technology like ipfs?
but there’s just so many barriers to get this done. and it’s really hard to build something useful to humanity, when you know that you’re not going to get paid a huge ton of money.
the logistics is extremely hard as well. there are so many technological challenges in building such a system?
how would users discover cool open source projects? how would you assign star equivalents? how would private repositories work?
and most importantly, how can you guarantee that if you use a distributed system, that your repository will always be available to anyone?
maybe a small, smart group of people will come up with something clever and extremely functional. maybe not.
but overall, i’m still putting my stuff on Github. And trust in Microsoft. For now.