Saturday, November 19, 2011
An idea for the future...
I want to work on developing a webapp music player that integrates MusicBrainz services. The webapp should play local files with MusicBrainz meta-data.
Wednesday, November 16, 2011
List files in FTP and Download/Unzip it
curl ftp://ftp.aoml.noaa.gov/phod/pub/IES_FTP/abaco/ > temp.txt
for each in `cat temp.txt | awk '{print $9}'`; do wget ftp://ftp.aoml.noaa.gov/phod/pub/IES_FTP/abaco/$each && unzip $each; done;
for each in `cat temp.txt | awk '{print $9}'`; do wget ftp://ftp.aoml.noaa.gov/phod/pub/IES_FTP/abaco/$each && unzip $each; done;
Tuesday, October 25, 2011
Exporting path...
I always seem to forget this line...
I currently have this in .bashrc, but it may not be the best place to put it.
export PATH=$PATH:/new/path/to/add:/other/new/path
I currently have this in .bashrc, but it may not be the best place to put it.
export PATH=$PATH:/new/path/to/add:/other/new/path
Renaming file numbers
This little script will rename badly named files into nice 3 digit numbers.
For example, if you have files, 1,2,3,...10,11,12, it will rename the files into 01, 02, 03, etc.
For example, if you have files, 1,2,3,...10,11,12, it will rename the files into 01, 02, 03, etc.
#!/bin/bash
echo $1;
mkdir $1/output
for each in `ls $1`
do
filename=$(echo $each | cut -f1 -d '.' | tr -d '[[:digit:]]')
extension=$(echo $each | cut -f2 -d'.')
number=$(echo $each | tr -cd '[[:digit:]]')
echo $number;
cp $1/$each $1/output/$filename`printf "%03d" $((10#$number))`.$extension
done
Wednesday, October 19, 2011
I Wish There Was....
I am not one to stand out or break out from the norm, but I have an idea that I think has a lot of potential.
I think that there should be a new playlist format that explicitly uses Musicbrainz Ids... or at least a music player which allows users to see the MBID....
I think that there should be a new playlist format that explicitly uses Musicbrainz Ids... or at least a music player which allows users to see the MBID....
Friday, October 7, 2011
Script to connect to HunterNet
The connection to my university wifi is terrible and requires authentication. I have written a small script here which allows me to connect to the internet without a browser.
#!/bin/bash
IP=$(ip addr show wlan0 | grep inet | head -n1 | cut -f6 -d ' '| cut -f1 -d '/')
MAC=$(ip addr show wlan0 | grep link | head -n1 | cut -f6 -d ' ')
echo $IP;
echo $MAC;
echo `curl -d "user=USERNAME&password=PASSWORD" https://securelogin.arubanetworks.com/cgi-bin/login?cmd=login&mac=$MAC&ip=$IP`
echo "CONNECTED!"
Tuesday, September 6, 2011
Organizing a few links...
I am beginning an android project and I just wanted a place to organize a few links.
Maven Archetype
https://github.com/akquinet/android-archetypes/wiki/android-with-test-archetype
Maven Plugin
http://code.google.com/p/maven-android-plugin/
Android SDK
http://developer.android.com/sdk/index.html
To download the correct version, run the 'android' application. You can choose which version to install from there.
Export ANDROID_HOME in your .bash_profile
Sighs.. this is looking like it will be more complicated than ever!
Maven Archetype
https://github.com/akquinet/android-archetypes/wiki/android-with-test-archetype
Maven Plugin
http://code.google.com/p/maven-android-plugin/
Android SDK
http://developer.android.com/sdk/index.html
To download the correct version, run the 'android' application. You can choose which version to install from there.
Export ANDROID_HOME in your .bash_profile
Sighs.. this is looking like it will be more complicated than ever!
Subscribe to:
Posts (Atom)