05.14
This song is called Cindy Electronium. It is about the scientific way to admire someone for who they are.
http://seanneilan.com/wp-content/uploads/2010/05/00.-Cindy-Electronium.mp3
(right click & save-as.)
The voices in my head tell me I'm the sanest man on the moon.
This song is called Cindy Electronium. It is about the scientific way to admire someone for who they are.
http://seanneilan.com/wp-content/uploads/2010/05/00.-Cindy-Electronium.mp3
(right click & save-as.)
I call this Argument Error #1. For those who don’t know, I love computer error messages in the same way a Swedish banker might demonstrate love and fervor for a terrorist captor. I’ve passed strings and integers to functions before but I’m not sure how I might pass this painting. Thus, g++ would probably give me an argument error for this.
Sorry for the bad photograph. I’ll make a better one once I get off spring break. I’ll also get back to ALL the emails. Every last one of them. And phone calls. And text messages. I disconnected myself while I worked on this.
This is some code to get all links from a fully qualified url. It returns a list of fully qualified links from the page. Unfortunately, some sites (like this one) embed links in javascript so you can’t scrape all the mp3s. I’ll have a solution to that later with either Uzbl or Proxystrike. My experiences with running javascript inside of python using spidermonkey have not been good.
import re
import urlparse
import urllib
# retrieves a set of links for any html page
def links(url):
page = urllib.urlopen(url)
if page == None:
return []
try:
html = page.read()
except:
return []
# get all href='s into a list
pattern = """href=['"][^'"]*"""
pattern = re.compile(pattern, re.IGNORECASE)
rawLinks = pattern.findall(html)
# get scheme, host & path of original url
url = list(urlparse.urlsplit(url))
if re.search("/$", url[2]) == None:
urlPath = url[2].split("/")
urlPath.pop(len(urlPath)-1)
if urlPath == []:
url[2] = "/"
else:
url[2] = "/".join(urlPath) + "/"
# buffer for holding all links to be returned
gewdLinks = []
# turn each href into a fully qualified url
for i in range(len(rawLinks)):
# remove "href=" from each list[i]
rawLinks[i] = rawLinks[i][6:]
curLink = list(urlparse.urlsplit(rawLinks[i]))
# no operations on emails or javascripts
if not rawLinks[i].count("mailto") and not rawLinks[i].count("javascript"):
# set scheme
if curLink[0] == "":
curLink[0] = url[0]
# set host
if curLink[1] == "":
curLink[1] = url[1]
# expand relative url
if re.search("^/", curLink[2]) == None:
curLink[2] = url[2] + curLink[2]
# skip if https link.
if curLink[0] != "https":
rawLinks[i] = urlparse.urlunsplit(tuple(curLink))
gewdLinks.append(rawLinks[i])
return gewdLinks
is the best man in the middle attack thingy for http requests I’ve ever seen. If you ever want to quickly reverse engineer some program that connects to the internet or a private iphone api (like mint.com’s) You can configure your os to use iptables to http packets through this program. Or, if a program can detect that your using a proxy server, you can configure squid to act as a hidden proxy but then use proxy strike as its proxy. Kind of like a proxy-proxy. Next time I bother reverse engineering something I’ll post the code to this.
Fortunately, there’s a program called sshfs which mounts an sftp connection as a drive using fuse. To install in Ubuntu,
sudo apt-get install sshfs.
Then, when you want to connect to an sftp server, add two aliases to your bashrc file like this:
#mounting alias
alias seanneilan.com='mkdir ~/ftp/seanneilan.com/; sshfs -o uid=1000 -o gid=1000 sneilan@seanneilan.com:/ -p 22 ~/ftp/seanneilan.com/; cd ~/ftp/seanneilan.com/home/sneilan'
#unmounting alias
alias useanneilan.com='cd ~; fusermount -u ~/ftp/seanneilan.com; rmdir ~/ftp/seanneilan.com'
Choose a name for your connection. Mine is seanneilan.com. Copy/paste & replace all instances of seanneilan.com with the name of your connection. Replace sneilan@seanneilan.com:/ with your username, host & initial directory. Be sure to create a folder called ftp in your home directory.
If you lose your connection, you’ll have to unmount, remount and reopen all your files since the file pointers will get messed up.
I was thinking about implementing something with fschange. That way, I could make a program that makes a copy of whatever you’re about to edit and instead opens up the copy rather than the one on the sftp server. Then, when you save, fschange will notify some program to copy/paste your changes over to the sftp server. Should the sftp connection drop, the program will automatically reconnect. I might do this later.
It also helps if you use ssh keys.
There’s this window manager called Xmonad. It’s magnificient because it lets you manage windows with a keyboard. You have 8 or so portals to different workspaces on each monitor.

You can have different programs running on different workspaces and switch them by pressing Alt-~-0-9. Bring up a new program with Alt-p-p & then type the name of the program. Kill a program with Alt-Shift-C. Send windows to other desktops with Alt-Shift-W or E. Use Wmii bindings like mine. There’s a lot more to this xmonad and you can read my config file or just go here.
Xmonad is definitely an advancement in interaction with computers for those who are willing to go an extra step to learn new things.
I’ve been running Linux for a long time. For the most part, I’ve understood the various linux desktops as largely trying to be like windows but more powerful. (At least when you look at Gnome or KDE, the great front ends to Linux.)
I just biked to Aldis and got something like $50 worth of groceries for like $22. That was awesome. Even with their supposed price cuts, Dominicks & Jewel just can’t beat Aldi’s.
Things have been a bit slow in a past couple days as my friend Derek & I have been building an android application over winter break.
I have added the arbitrator, controller, buildmanager and constructionmanager classes to the project. The constructionmanager class is halfway done & the other three classes haven’t been tested. I need to complete the holy trinity of construction, production and morph manager to test them properly. Testing of course will probably take longer than it took to write, but, hey, by January 1st, we should have this whole pybwsal thing done.
My friend Derek Schaefer & I have started a project called pybwsal for the starcraft ai competition. Bwsal is a set of utility functions to making programming starcraft ai’s in bwapi (which is a set of utility functions in c++ for programming starcraft ai’s) easier.
So far, the building placer has been implemented & I was working on implementing the building manager but unfortunately ran into issues yesterday. SeeĀ http://code.google.com/p/pybw/issues/detail?id=20
In the meantime, I will work on programming the bid system as Chad Retz (and perhaps others) from the bwapi-jbridge project is interested in that.
You can keep up to date on pybwsal by subscribing checking back to http://seanneilan.com/tag/pybwsal/ every once in a while.
My goodness. What a massive loss to the community. Thousands and thousands of country music songs have been lost from youtube thanks to copyright claims. I began to like country music too and now there is simply no way to get any of it without going to the library? I mean, never in my life would I pay for anything in this world that might be gotten for free on the Internet. (Library costs money! Gas!)
And if you care, here is his old bio:
Old as dirt. retired. I am a Christian but I am also a mortal man. Not perfect, born in sin so I believe I must rely on something more powerful than man to guide and help me during my bad times. I want to do good when I am able and avoid doing bad . That is my goal although it is not possible to achieve all the time.
Maybe I can troll thepiratebay.org for Corrina Cordwell, Slim Whitman, Jim Reeves, Merle Haggard, Merle Travis, Ernie Freeman, Kitty Wells, Marty Robbins, Highway 101, Eddy Arnold, Billy Walker, Frank Ifield, Tom T hall, Gene Autry, Roy Rodgers, Johnny Cash and Johnny Horton.
Sean Neilan is Digg proof thanks to caching by WP Super Cache