Update to Cli Script

a long while back I wrote some little bash function which automatically create bash aliases for moving around commonly used areas in my file system. This worked awesome until one day I was working on a machine where i was not my normal username. I use a synced bash_alias file when I used the alias and moved to edit files in /home/dloman/Source/ and was not the dloman user things got very confusing when I tried to save my edits. Needless to say it took me awhile of thinking I was completly insane until I figured out what was happening. I edited the file with the sed command to replace the expanded $HOME path with the actual string $HOME. the command is as follows:

1
2
3
4
5
function mark
{
  echo "alias $1='cd $(pwd)'" >> ~/Dropbox/Config/bash_aliases ;
  source ~/Dropbox/Config/bash_aliases
}
Comments

Blastomatic - Red Bull Creation Contest

Here’s another post of an old project. This project was our team’s entry for the 2013 Red Bull creation contest. The Blastomatic is a electronically controlled super soaker which spells out the word Red Bull in electro-luminescent water.

Read on →

Key-less Entry and Ignition System

This project, is an old project I did as my final exam for UCSB Physics 128BL, Digital Electronics Lab. watch the video for a demonstration or click through for more (albeit sparse) details.

Read on →

Adjustable Desk

Hello Internets. I hope you have been doing great. I work at a computer 40+ hours week and sitting for that long isn’t good for you. So I been wanting to try out a standing desk. I was definitely not certain I could stand for an 8 hour day and not wanting to be in lots of pain I decided to make an adjustable desk. So my roommate and I built me an adjustable desk. It came out amazingly well. For buildpics and comments click the link.

Adjustable Desk

Read on →

Remote Controlled Power Outlet

Was on adafruit a few weeks backs and found this little guy and the corresponding remote . I immeditely purchased that I had one of these relay boards lying around in my closet. So i decided to make a 315 Mhz controlled junction box for turning on my lights with a remote. Here is a video of the finished product

Here is how I made this bad boy.

Read on →

Alternative for Quick Cli Filesystem Navagation Shortcutting

I saw this great blog post about an easy way to create and remove shortcuts for commandline navagation to often used directories. In the past I would often manually make bash aliases for commonly used directories, so I was psyched to automate this. I much prefer just typing the DirName instead of the jump DirName used in Jeroen’s version, so I modified his commands with my own. Here are the commands I came up with.

1
2
3
4
5
6
7
8
9
function mark {
  echo "alias $1='cd $(pwd)'" >> ~/Dropbox/Config/bash_aliases ; source ~/Dropbox/Config/bash_aliases
}
function unmark {
  sed -e "/^alias $1='cd/d" -i ~/Dropbox/Config/bash_aliases ; source ~/Dropbox/Config/bash_aliases
}
function marks {
  cat ~/Dropbox/Config/bash_aliases | grep "='cd" | sed -e 's/alias //' -e "s/='cd / \=\> /" -e "s/'$//" -e "/^  echo /d" -e "/&&/d" -e "/^  sed/d"
}
Read on →
Comments

Dinosaucers

Considering It’s made entirely out of cardboard, hotglue, paint and lights I am super stoked with how well this years Halloween costume came out.

Dinosaucers love to party

Read on →

New Mail Script

Wrote a quick little script today to check and see if I have new email. I am using the standard imaplib library along with python-ntlm with a imap patch found on https://github.com/xulz/python-ntlm I didn’t really want to save my cleartext password in the script so pickled the ImapNtlmAuthHandler

1
2
3
4
AuthFile = open(SuperCoolFileLocation,'wb')
AuthHandler = IMAPNtlmAuthHandler(r"domain\username", "password")
pickle.dump(AuthHandler, AuthFile)
AuthFile.close()

It’s probably not much more secure, but it’s more secure then saving in plaintext. If I am wrong and there is a better safer way to do it let me know.

Read on →