Who?

I'm Brandon Smith, an undergraduate computer science student at The University of Texas at Austin.

My computer-science-related interests vary widely, but recently I have done projects in web development, Linux systems, and encryption/hashing algorithms.

You should check out some of the projects that I've worked on.


Recent Blog Posts:

Pulled from the full blog here.


Using the .deb package for 19.04:

sudo apt-get install libavahi-compat-libdnssd1
sudo dpkg -i synergy_1.11.1.stable\~b58+55ec3105_ubuntu19_amd64.deb
sudo apt --fix-broken install


This is the config file located at /etc/ddclient.conf:

# created by Brandon Smith
use=if, if=enp0s3
ssl=yes
protocol=googledomains
login=$LOGIN
password=$PASSWORD
downloader.local.bismith.net

Of course, replace $LOGIN and $PASSWORD with the credentials provided by Google Domains for the domain or subdomain that you’re setting up. Also, make sure that the last line is your FQDN.

You’re probably going to want to set this up as a daemon in Linux. Edit the file /etc/default/ddclient, change run_ipup to false, and change run_daemon to true. After this, you may need to run sudo systemctl restart ddclient.service.

My above use case is for a machine that is reporting its local IP address, despite being behind a NAT. In my case, that’s what I want, but you may also want to report the public IP if the machine runs a server that is configured with port forwarding to be visible to the internet. Many examples of this can be easily found by Googling around.


I had to disable pulseaudio, using ALSA instead. I followed the guide here. In case it’s down, the gist is adding autospawn = no to /etc/pulse/client.conf (uncommenting the line and changing “yes” to “no”).


In order to watch a video packaged as DCP, the video generally must be converted to a format that can be read by consumer media players, such as H.265 (HEVC). This post will use Creative Commons-licensed Tears of Steel 4K DCP package as an example.

ffmpeg -i tos_version_05/tos_picture.mxf -i tos_version_05/tos_sound.mxf -map 0:0 -c:v libx265 -pix_fmt yuv420p -crf 22 -map 1:0 -c:a opus -b:a 160k Tears.of.Steel.2012.4K.x265.opus.mkv

Note that the video pixel format must be specified.


This requires root privileges, and only works if you’re using systemd:

systemctl reboot --firmware-setup

Copy install.wim and boot.wim from the sources directory in the iso to a temporary place accessible from a Windows machine, as you will need to use DISM, a built-in command-line tool in Windows.

From inside Windows, create a directory called mount in the same location as the .wim files. Create a folder called USB3 in the same location. Inside the folder called USB3, create another called x64, where you will place the x64 USB 3.0 drivers that you will load. If you’re installing USB 3.0 drivers for an Intel NUC, those drivers can be found here.

Then, run the following set of commands to load those drivers into the .wim files. For the first command, you can determine the correct index by using the method from the previous post. For the second two times, you must use index 1 and then index 2.

dism /mount-wim /wimfile:install.wim /index:3 /mountdir:mount
dism /image:mount /add-driver /driver:USB3\x64 /forceunsigned /recurse
dism /unmount-wim /mountdir:mount /commit
dism /mount-wim /wimfile:boot.wim /index:1 /mountdir:mount
dism /image:mount /add-driver /driver:USB3\x64 /forceunsigned /recurse
dism /unmount-wim /mountdir:mount /commit
dism /mount-wim /wimfile:boot.wim /index:2 /mountdir:mount
dism /image:mount /add-driver /driver:USB3\x64 /forceunsigned /recurse
dism /unmount-wim /mountdir:mount /commit

Then, copy install.wim and boot.wim back to the temporary directory where you placed the files from the iso, replacing the old versions of install.wim and boot.wim.

Create the patched ISO. This must be done from Linux again, from inside the previously mentioned directory:

mkisofs -o ../win7.iso -b boot/etfsboot.com -no-emul-boot -boot-load-size 8 -iso-level 2 -udf -joliet -D -N -relaxed-filenames .

Most credit goes to Intel and Chris Hoffman.


This has been tested to work with Windows 10.

Insert or mount Windows installation disc/iso. Note the drive letter. For the sake of this post, I’m using D: as the iso mount point, and E: as the usb drive letter.

From an administrator-level command prompt or powershell, use diskpart to prepare the external drive (replacing the drive letter with something appropriate for your circumstances):

C:> DISKPART

DISKPART> LIST DISK

  
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          298 GB      0 B
  Disk 1    Online           29 GB      0 B

DISKPART> SELECT DISK 1

Disk 1 is now the selected disk.

DISKPART> CLEAN

DiskPart succeeded in cleaning the disk.

DISKPART> CREATE PARTITION PRIMARY

DiskPart succeeded in creating the specified partition.

DISKPART> FORMAT FS=NTFS QUICK

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> ACTIVE

DiskPart marked the current partition as active.

DISKPART> ASSIGN LETTER=E

DiskPart successfully assigned the drive letter or mount point.

DISKPART> EXIT

Leaving DiskPart...

C:>

At this point, you may need to open Disk Management in order to assign a drive letter to your newly-formatted USB drive.

Use the DISM build-in command. Sometimes install.wim is named differently, like install.esd. It is usually, by far, the largest file in the iso, so it should be easy to find.

To determine which index you wish to use:

C:> dism /get-wiminfo /wimfile:D:\sources\install.wim

To apply an image, using Windows 10 (this part will likely take a while):

C:>dism /Apply-Image /imagefile:D:\sources\install.wim /index:1 /ApplyDir:E:\

If you’re using Windows 10, skip to the part about installing Windows boot files. If you’re using Windows 7, applying the image can get a bit more tedious, but it’s still possible. First, download imagex.exe as outlined in the article linked at the end of this post. Alternatively, those connected to my VPN can download it from here. Then, navigate to where you’ve placed the downloaded file (for me, it was C:\Users\Brandon\Downloads\):

C:\Users\Brandon\Downloads>.\imagex.exe /apply D:\sources\install.wim 1 E:\

By the way, the previous method also works in Windows 10, but it is unnecessary, as the built-in DISM tool can take care of it.

Then, copy all files from E:\mount\ to E:\.

Install Windows boot files:

bcdboot E:\WINDOWS /S E: /F ALL

In Windows 7, you may need to omit the /F ALL from the above command.

Done!

If you want to enable the Windows Store in this new installation, do this from inside your new installation:

C:> gpedit

Under Computer Configuration, open Administrative Templates | Windows Components | Store.

In the right pane, right-click the entry Allow Store to install apps on Windows To Go workspaces and click Edit to select the Enabled option and click OK.

Most credit goes to this article and its comments.


Add the following to the end of /boot/config.txt

max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

Raspbian Automatic Login

Tue, 31 May 2016

Create a file at /etc/systemd/system/getty@tty1.service.d/autologin.conf with the contents:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin bismith --noclear %I 38400 linux

And then run:

sudo systemctl enable getty@tty1.service

I had to use this to fix a Patriot Tab 32GB flash drive I had. The drive would only mount as read-only. Here’s a copy in case that site ever goes down or changes.


Chief, I need…

Mon, 30 Mar 2015

Chief, I need…

– Those ship repairs ahead of schedule
– Those gravity actuators replaced
– The food replicators on deck 7 calibrated
– The Alamo simulation reworked
– That Changeling detector ASAP
– Keiko’s birthday party delayed, something’s come up
– you to help Julian with his Section 31 business
– Figure out a countermeasure to the Breen weapons
– Those thermal inducers reformatted, we’re not Cardassians
– you to drink blood wine with Worf
– the bar’s lights reconfigured, they’re hurting Morn’s eyes.
– my desk back where it’s supposed to be
– You to study the rules of Baseball so we can play against Vulcans
– That crate of self-sealing stem bolts


sudo nano /etc/kbd/config

Change BLANK_TIME and POWERDOWN_TIME to both be zero. Then, to apply changes:

sudo /etc/init.d/kbd restart

Note that this is different than this method, which should probably work with most other Linux systems.


Using omxplayer:

omxplayer -r -o hdmi <video file>

You may need to use sudo, if you can’t get stuff to work. Or maybe try the first thing from this post.

And here is some info on controlling omxplayer.


Here is the code that will mount a TrueCrypt volume with the specified file system options:

sudo truecrypt --mount --fs-options="users,uid=1000,gid=1000,fmask=0113,dmask=0002" /path/to/container /path/to/mountpoint

Tested in Elementary OS Luna (based on Ubuntu 12.04 LTS) on a Lenovo Yoga 13.

To mute:

amixer set Master mute

To unmute:

amixer set Master unmute

This is useful if you want the volume to always be muted on boot, in case you start up the computer in class or whatever.


Sublime Text Customizations

Wed, 04 Jun 2014

To hide the scroll bars, add the following line to the Preferences > Settings - User:

"overlay_scroll_bars": "enabled"

To make F5 refresh the sidebar’s directory view, add the following to Preferences > Key Bindings - User:

{ "keys": ["f5"], "command": "refresh_folder_list" }

To make Unix-style line endings the default (in case you’re in Windows but want to write shell scripts or something), add the following to Preferences > Settings - User:

"default_line_ending": "unix"

Bash Prompt Colors

Wed, 04 Jun 2014

This is currently my bash prompt. Locate this code in any script run by bash at startup. I have it in ~/.bashrc

GREEN="\[\e[1;32m\]"
BLUE="\[\e[1;34m\]"
YELLOW="\[\e[1;33m\]"
CYAN="\[\e[1;36m\]"
RESET="\[\e[m\]"
BRANCH=$CYAN
PS1="$GREEN\u@\h $BLUE\w $BRANCH\$(git branch 2>/dev/null | grep '^*' | colrm 1 2 | parens | tr -d '\n')$BLUE\$ $RESET"

This relies on parens, a simple program that I wrote that can be found here (repo has since been removed, dotfiles are now in this repo).


Elementary Tweaks

Wed, 04 Jun 2014

This will be all about getting Elementary OS set up the way Brandon likes it.

To install Elementary Tweaks:

sudo apt-add-repository ppa:versable/elementary-update
sudo apt-get update
sudo apt-get install elementary-tweaks

To install Wingpanel Slim:

sudo apt-get install wingpanel-slim

More information about Elementary add-ons can be found here:

Many of the packages in the PPA are quite useful, such as indicator-synapse.


This worked for me with the Elementary OS, a distribution of Linux based on Ubuntu, which in turn is based on Debian, but you may have luck getting this to work in other distributions as well.

For the WiFi, you must download and install the wireless driver. Instructions can be found at the GitHub repository for that driver. Essentially, you can run install.sh to install the driver. This may need to be redone after certain system updates.

For the backlight adjustment buttons to work, open /etc/default/grub and replace the following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Just remember to run sudo update-grub after modifying the file.

See this link for more information.

Also, this is a problem that I’ve had before, but sometimes Elementary won’t remember my natural scrolling preferences, so I’d have to re-enable it each time I boot (which is annoying). In order to avoid this, add this command to Startup Applications:

/usr/lib/plugs/pantheon/tweaks/natural_scrolling.sh true

The Origins of Life

Wed, 28 May 2014

Mostly I’ve posted technical stuff here that I’d like to remember, but true to the purpose of this site (blog?) I feel compelled to post this.

I have often wondered about the origins of life, and whether or not life could have begun without the aid of an intelligent creator. In my search, I have stumbled upon a few topics of interest.

Unrelated to the origins of life, but nonetheless interesting in regards to the study of life itself, is the Hayflick limit.

me
 
 

@VectorCell
VectorCell starred Tentacule/PgsToSrt Aug 13, 2020

PGS to Srt converter

C# 6 Updated Aug 13

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 12, 2020
1 commit to master
  • @VectorCell 637a3be
    overhaul of youtube-dl installation in env-setup

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 11, 2020
1 commit to master
  • @VectorCell ac257d3
    added configuration for install-scripts to env-setup

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 11, 2020
1 commit to master
  • @VectorCell a6c2da4
    added install-wol.sh (still a work in progress)

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 11, 2020
1 commit to master
  • @VectorCell d0c34c7
    added send-to, fixed wake-mac

@VectorCell
VectorCell starred intelowlproject/IntelOwl Aug 10, 2020

Intel Owl: analyze files, domains, IPs in multiple ways from a single API at scale

Python 753 Updated Aug 13

@VectorCell
VectorCell pushed to master in VectorCell/tmux-configuration Aug 10, 2020
1 commit to master
  • @VectorCell 884c339
    added support for lbbtop to tmux-power, and also removed support for …

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 10, 2020
1 commit to master

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 10, 2020
1 commit to master
  • @VectorCell 90e870d
    added install-sublime-text.sh

@VectorCell
VectorCell pushed to master in VectorCell/tmux-configuration Aug 10, 2020
1 commit to master
  • @VectorCell d4de19c
    added support for lbbtop to tmux-cpu

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 9, 2020
1 commit to master
  • @VectorCell ebbc590
    fixed last modification to set-ip-secondary

@VectorCell
VectorCell pushed to master in VectorCell/tmux-configuration Aug 9, 2020
1 commit to master
  • @VectorCell 160d8c1
    temporarily disabled tmux-network, see comment in tmux-network for de…

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 9, 2020
1 commit to master
  • @VectorCell 5fee019
    added support for removing ip configuration set by set-ip-secondary

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 9, 2020
1 commit to master
  • @VectorCell fb771e8
    modified set-ip-secondary

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 9, 2020
1 commit to master

@VectorCell
VectorCell pushed to master in VectorCell/misc-scripts Aug 8, 2020
1 commit to master
  • @VectorCell c5ba05e
    added previous changes to mountssh to mountssh-readonly

@VectorCell
VectorCell pushed to master in VectorCell/pubkeys Aug 7, 2020
1 commit to master

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell ce6de56
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 32573d5
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 3a7193f
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 82544b5
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 86e559e
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 1c4a918
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 654e130
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 4e51316
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell c974aec
    added install-virtualbox-6.1.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell f7a8e90
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell acb063a
    progress on install-nextcloud.sh

@VectorCell
VectorCell pushed to master in VectorCell/install-scripts Aug 6, 2020
1 commit to master
  • @VectorCell 82b5c25
    progress on install-nextcloud.sh