The Case For Traveling Alone

Posted on 27 July 2019

And by “travel”, I don’t necessarily mean hopping on some expensive flight and staying at a luxury resort. In my experience, so many people haven’t explored the places they live and work at, and often miss the gems around them that other people take a long trip to see! So by “travel” I simply mean to explore and do things: go on a hike, out to eat, to a concert, with or without somebody to do it with.

In the past year, I’ve had a lot of opportunities to explore places alone, from a long layover to taking extra days at the tail end of a college department organized service trip, to excursions and nights out alone in Houston, where I spent the summer and had few connections. Don’t get me wrong, I love traveling and exploring with other people too, and that has its benefits that are unique from the experience when rolling solo. However, through these opportunities, I’ve had awesome experiences that I wouldn’t have been matched if I were with somebody.

From walking over 30 blocks in San Francisco instead of taking BART just because it was a good day and I wanted to take it all in, to a spontaneous decision to rent a kayak in Austin, being on your own allows you to explore with no compromises (except with your wallet!) about what you want to do. And with all that time you spend thinking about others and what they do or don’t want to do, I think it’s important to take some time and just do what you want to. What I’ve also learned is nobody cares if you’re eating out, going to a concert, or doing anything else alone. As Tom and Donna in Parks and Rec put it, “treat yo self”. It’s during those 6 mile hikes, the gaps between artists at a concert, rental-bike rides at iconic monuments, and amazing dining experiences I enjoyed alone this year that I felt like I grew the most this year. Here are some random pictures from my solo adventures:

Spring Break

Posted on 16 March 2019

For Spring Break, I participated in Duke Energy Initiative’s solar spring break program. Through this, I got to help install solar panels with Grid Alternatives in Salinas, CA. They were super friendly and showed us the various steps in the process, such as siting, dealing with regulations and codes, efficiency considerations, etc as well as letting us gain some hands on experience installing solar panels.

We stayed in a hostel in Monterey, CA which was a pretty cool experience. It’s really an awesome city, and going on runs along its coastline was amazing. I also got to spend my last day in California exploring San Francisco. I decided to walk all the way from 6th st | Market St to Pier 39 and then along the Embarcadero, which was a lot of walking but definitely worth it. Then I biked across the golden gate bridge, took BART back and almost missed my flight

Duke vs UVA

Posted on 19 January 2019

View this post on Instagram

Watched Duke crush UVA and developed an extreme hate for the sound of a siren this week

A post shared by Jimmy Xiao (@jimmyjxiao) on

Winter Break

Posted on 07 January 2019

Winter Break was my first time back home in Utah since August when I left for college, so I was definitely pretty excited (plus I was mentally shot after finals). The trip home was pretty hectic with schedule changes I didn’t know about until the last minute, issues with the plane, and other things, but I made it back in one piece so yay.

As I got home, my dogs were super happy to see me which was awesome, as I had been thinking of them during the whole semester. I made sure they get lots of pats, treats, walks, and adventures with me this break. I had really missed driving too, and I really liked being able to drive again during the break.

I went and visited Lone Peak High School again, and saw some of my teachers, and it was pretty cool visiting as an alumni instead of a student. I also visited In-N-Out for my first meal back, and saw some of the people I used to work with, although many weren’t there either because they had transferred to different stores or quit. I missed that awesome ‘Chz W GR mfd chillies Light S XChz’ so much though, and rewarded myself for finishing a semester with one.

I went skiing, caught up with old friends, avoided things I should’ve been doing, and explored random places. It was kinda weird coming back home and realizing a lot of my friends weren’t around because they were on missions or elsewhere, but I’m still glad I got to see the ones I did.

I’m writing this during my 8 hour layover here in Denver, which actually didn’t end up being very bad because I took the oppurtunity to explore the city. Randomly wandering around an unfamiliar city alone is actually very fun, and I’m actually really glad I had a layover here this long. Denver really is a bigger version of Salt Lake City in many respects (but with breathable air!) and it was fun seeing all the similarities between the cities.

Here’s some random pictures from the break:

Using an Arduino to detect multirotor's RC input

Posted on 20 December 2018

So I had a setup where I had an R9DS RC receiver connected to a Librepilot CC3D with SBUS and I wanted to control two servos with an accessory channel switch on my transmitter. I needed the servos to trigger, but reversed to each other when I flipped the accessory switch on. I figured out it was pretty impossible to do on the CC3D, so here’s how I did it with an arduino nano. NOTE: The exact method I used only works when your receiver can output the channel on SBUS and PWM simultaneously, the arduino will listen to PWM.

  1. Wire up 5v power to the arduino nano and servos
  2. Wire the PWM channel to a digital input on the arduino
  3. Upload this to arduino to see what the on/off PWM values for are by watching the serial window as you flip the transmitter accessory switch
byte PWM_PIN = 3;
 
int pwm_value;
 
void setup() {
  pinMode(PWM_PIN, INPUT);
  Serial.begin(115200);
}
 
void loop() {
  pwm_value = pulseIn(PWM_PIN, HIGH);
  Serial.println(pwm_value);
  //delay(500);
}

Now you can determine what state the remote acessory switch is in with pulseIn. Here’s my use case:

{

#include <Servo.h>

Servo LeftServo;  // create servo object to control a servo
Servo RightServo;

void setup() {
  pinMode(3, INPUT);
  LeftServo.attach(9);  // attaches the servo on pin 9 to the servo object
  RightServo.attach(10);
}
void OperateJaw(bool isOpen)
{
  if(isOpen)
  {
    LeftServo.write(180);
    RightServo.write(0);
  }
  else
  {
    LeftServo.write(0);
    RightServo.write(180);
  }
}
int pwm_value;
void loop() {
  pwm_value = pulseIn(3, HIGH);
  if(pwm_value > 1200)
    openState = false;
  else
    openState = true;
  OperateJaw(openState);
}

Using Windows' New Built In OpenSSH to Secure RDP

Posted on 19 December 2018

I have two computers at college, my custom desktop, and my laptop. Both are running Windows 10, but what’s important to this guide is the desktop is running Windows 10 as the client configuration here is trivial to replicate on OSX or Linux, probably even easier. The desktop is definitely the powerhouse, and I do all of my heavier applications and processing on it. However, I’m out and about on campus most of the day, and am sometimes unable to access my desktop when I need to. I was reluctant to just open up RDP on my firewall given the security risks, and I thought setting up a personal VPN to access one port on one computer would be overkill, so I decided to go with SSH port forwarding.

Server Configuration

  1. Install OpenSSH on Windows. It’s pretty simple, just use add/remove features and check ‘OpenSSH Server’. Detailed guide here.
  2. (optional but highly recommended) Edit to disable password authentication and force pub/priv key authentication for maximum security.
  3. (optional) Change the listening port for SSH for security through obscurity and allow the new port through the firewall

The sshd_config file on windows is located at %programdata%\ssh\sshd_config

I recommend adding this line: PasswordAuthentication no to disable less secure password authentication and only rely on more secure pub/priv keys. If you do this, run ssh-keygen on the client, go to %userprofile%\.ssh, and copy the contents of the id_rsa file on the client to a file on the server in the same location called authorized_keys.

You can change the port from 22 if you want security through obscurity with this line in sshd_config: Port [port number] Make sure to allow the port through on your firewall and forward through your router if necessary.

Client Configuration

  1. Install an OpenSSH client. On Windows, I highly recommend OpenSSH, installable through add/remove features. You just need the client.
  2. Test
    1. Connect to the remote computer while forwarding the port: ‘ssh -L 4000:localhost:3389 [IP address] -p (port set in sshd_config)’
    2. Initiate RDP by opening remote desktop connection or a VNC client on Linux and connect to ‘localhost:4000’
  3. If that works, write a script to run it! Here’s a super crappy one in powershell:
$ArgumentList = '-L 4000:localhost:3389 ' + $content + ' -p 31825'
Start-Process ssh -ArgumentList $ArgumentList -NoNewWindow
Start-Sleep 5 
mstsc /v localhost:4000
wait-process -name mstsc
exit