<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEECQXc9fCp7ImA9WhBWGE4.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979</id><updated>2013-04-13T00:04:20.964-07:00</updated><category term="virtualization" /><category term="conky" /><category term="DNS" /><category term="javascript" /><category term="proxoid" /><category term="perl" /><category term="homestarrunner" /><category term="sip" /><category term="wine" /><category term="getting things done" /><category term="eeepc" /><category term="phone" /><category term="chrome" /><category term="gnome" /><category term="home" /><category term="firefox" /><category term="xampp" /><category term="cisco" /><category term="encryption" /><category term="sharepoint" /><category term="bradleyit.com" /><category term="css" /><category term="family" /><category term="video" /><category term="slacker.com" /><category term="productivity" /><category term="bash scripting" /><category term="greasemonkey" /><category term="work" /><category term="cars" /><category term="database" /><category term="customization" /><category term="friends" /><category term="1234567890" /><category term="linux" /><category term="gtd" /><category term="google voice" /><category term="tech" /><category term="jquey" /><category term="cygwin" /><category term="php" /><category term="WoW" /><category term="shooting" /><category term="ajax" /><category term="prank" /><category term="thanks" /><category term="XML" /><category term="ssh" /><category term="wii" /><category term="how I roll" /><category term="oracle" /><category term="networks" /><category term="misc" /><category term="eris" /><category term="jquery" /><category term="introspection" /><category term="updated" /><category term="android" /><category term="motd" /><category term="terminal" /><category term="SEO" /><category term="desktop" /><category term="church" /><category term="sql" /><category term="food" /><category term="twitter" /><category term="snmp" /><category term="lamp" /><category term="coffee" /><category term="taskd.me" /><category term="ubuntu" /><category term="ettercap" /><category term="formWorks" /><category term="json" /><category term="google" /><category term="mischief" /><title>MoBlog</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://moblog.bradleyit.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>562</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/bandit36/moblog" /><feedburner:info uri="bandit36/moblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUUDQ3g-cCp7ImA9Wx9XFkU.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-3288419435061358040</id><published>2011-01-10T11:14:00.001-08:00</published><updated>2011-01-10T11:21:12.658-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-10T11:21:12.658-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="lamp" /><category scheme="http://www.blogger.com/atom/ns#" term="xampp" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><category scheme="http://www.blogger.com/atom/ns#" term="oracle" /><title>Querying Oracle 10.2 from XAMPP on Ubuntu</title><content type="html">Just a quick note on how I got my XAMPP install talking to an Oracle 10.2 db:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Get Oracle InstantClient (you'll have to register):&lt;br /&gt;- &lt;a href="http://download.oracle.com/otn/linux/instantclient/10205/sqlplus-10.2.0.5.0-linux.zip"&gt;http://download.oracle.com/otn/linux/instantclient/10205/sqlplus-10.2.0.5.0-linux.zip&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://download.oracle.com/otn/linux/instantclient/10205/basiclite-10.2.0.5.0-linux.zip"&gt;http://download.oracle.com/otn/linux/instantclient/10205/basiclite-10.2.0.5.0-linux.zip&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Unzip both to /opt/lampp/var/oracle&lt;/li&gt;&lt;li&gt;Tell XAMPP where to look for the Oracle client:&lt;pre&gt;sudo /opt/lampp/lampp oci8&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Give the following path:&lt;pre&gt;/opt/lampp/var/oracle/instantclient_10_2&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Restart Apache:&lt;pre&gt;sudo /opt/lampp/lampp restartapache&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to make PHP calls to Oracle functions.&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/AeEaYEjVbPM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/3288419435061358040/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=3288419435061358040&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3288419435061358040?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3288419435061358040?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/AeEaYEjVbPM/querying-oracle-102-from-xampp-on.html" title="Querying Oracle 10.2 from XAMPP on Ubuntu" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2011/01/querying-oracle-102-from-xampp-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IDQng4fCp7ImA9Wx9QFkg.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-9176299795558396236</id><published>2010-12-20T13:37:00.000-08:00</published><updated>2010-12-29T12:46:13.634-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-29T12:46:13.634-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="jquey" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><category scheme="http://www.blogger.com/atom/ns#" term="desktop" /><category scheme="http://www.blogger.com/atom/ns#" term="json" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="how I roll" /><title>Day Glow Background for Ubuntu</title><content type="html">I work in a cubicle. Waa, waa, poor me. To combat this, I got the idea to write a script that will raise and lower the brightness of my desktop background with the time of day. When it's dark outside, my desktop is dark. When it's light outside, so is my desktop.  Below is the script to accomplish this and the content of an HTML file to help you find your WOEID:&lt;br /&gt;&lt;hr&gt;day_glow.sh&lt;br&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;#&lt;br /&gt;# to make this work:&lt;br /&gt;# 1 - $ sudo apt-get install imagemagick&lt;br /&gt;# 2 - Extract this ZIP to your hard drive&lt;br /&gt;# 3 - $ chmod +x day_glo.sh&lt;br /&gt;# 4 - $ ./day_glo.sh picture max min woeid&lt;br /&gt;# - picture = path to the background picture that you use \&lt;br /&gt;#      this script will create a &amp;lt;picture&amp;gt;.glow file \&lt;br /&gt;#      which should be set as your background&lt;br /&gt;# - max = an integer value for the maximum brightness you \&lt;br /&gt;#  want during the brightest part of the day&lt;br /&gt;# - min = same as max, but during the darkest part of the day \&lt;br /&gt;#  I find that a max of 100 &amp;amp; min of 25 do nicely&lt;br /&gt;# - woeid = this is your location identifier as Yahoo understands it \&lt;br /&gt;#  you can fire up the included 'woeid.html' file to find \&lt;br /&gt;#  the number for your location&lt;br /&gt;# 5 - $ crontab -e&lt;br /&gt;# - every hour = &amp;quot;0 * * * * /path/to/day_glow.sh /path/to/background.jpg 100 25 12799337&amp;quot;&lt;br /&gt;# - this will run the script on the hour, every hour&lt;br /&gt;# - &amp;quot;/path/to/day_glo.sh&amp;quot; = file path to this script&lt;br /&gt;# - &amp;quot;/path/to/background.jpg&amp;quot; = the image to be used as the backgorund \&lt;br /&gt;#          the script will output to &amp;quot;/path/to/background.jpg.glow&amp;quot; \&lt;br /&gt;#          which should be set as your background&lt;br /&gt;# - &amp;quot;100 25&amp;quot; = this sets the max brightness to 100 (midday) &amp;amp; min to 25 (midnight)&lt;br /&gt;# - &amp;quot;12799337&amp;quot; = WOEID for Vancouver, Washington - check woeid.html for yours&lt;br /&gt;&lt;br /&gt;NOW=$(date +%s)&lt;br /&gt;PIC=$1&lt;br /&gt;MAX=$2&lt;br /&gt;MIN=$3&lt;br /&gt;WOEID=$4&lt;br /&gt; &lt;br /&gt;wget -q http://weather.yahooapis.com/forecastrss?w=$WOEID -O- | \&lt;br /&gt; grep astronomy | \&lt;br /&gt; sed -E 's/.*sunrise=&amp;quot;([^ ]*) am&amp;quot;   sunset=&amp;quot;([^ ]*) pm&amp;quot;\/&amp;gt;/\1 \2/' | \&lt;br /&gt;while read -r SUNUP SUNDN; do&lt;br /&gt; SUNUP_DTS=$(date &amp;quot;+%Y-%m-%d $SUNUP:00&amp;quot;)&lt;br /&gt; SUNDN_DTS=$(date &amp;quot;+%Y-%m-%d $(( ${SUNDN%${SUNDN: -3}} + 12 )):00&amp;quot;)&lt;br /&gt; SUNUP_EPC=$(date --date=&amp;quot;$SUNUP_DTS&amp;quot; +%s)&lt;br /&gt; SUNDN_EPC=$(date --date=&amp;quot;$SUNDN_DTS&amp;quot; +%s)&lt;br /&gt; &lt;br /&gt; HALFDAY=$(( ($SUNDN_EPC-$SUNUP_EPC)/2 ))&lt;br /&gt; MIDDAY=$(( $HALFDAY+$SUNUP_EPC ))&lt;br /&gt; &lt;br /&gt; if [[ $NOW &amp;gt; $MIDDAY ]]; then&lt;br /&gt;  DIFF=$(( $NOW-$MIDDAY ))&lt;br /&gt; elif [[ $MIDDAY &amp;gt; $NOW ]]; then&lt;br /&gt;  DIFF=$(( $MIDDAY-$NOW ))&lt;br /&gt; fi&lt;br /&gt; &lt;br /&gt;# UPDATE - ADDED THIS BLOCK TO PREVENT FULL BLACKNESS&lt;br /&gt; if [[ $DIFF -gt $HALFDAY ]]; then&lt;br /&gt;  DIFF=$HALFDAY&lt;br /&gt; fi&lt;br /&gt;&lt;br /&gt; PERC=$(( 100-(100*$DIFF/$HALFDAY) ))&lt;br /&gt; &lt;br /&gt; SCALE=$(( $MAX-$MIN ))&lt;br /&gt; VAL=$(( ($PERC*$SCALE/100)+$MIN ))&lt;br /&gt; &lt;br /&gt; convert -modulate $VAL,100,100 $PIC $PIC.glow&lt;br /&gt;&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr&gt;woeid.html&lt;br&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt; &amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Ben's Really Simple WOEID Converter&amp;lt;/title&amp;gt;&lt;br /&gt;  &amp;lt;script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;  &amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;   function lookup_woeid() {&lt;br /&gt;    var place = encodeURI($('#place').val());&lt;br /&gt;    $.getJSON(&lt;br /&gt;     'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22'+place+'%22&amp;amp;format=json',&lt;br /&gt;     function(data) {&lt;br /&gt;      $('#output').html('');&lt;br /&gt;      if (data.query.count == 0) {&lt;br /&gt;       return false;&lt;br /&gt;      } else if (data.query.count == 1) {&lt;br /&gt;       var place = data.query.results.place;&lt;br /&gt;       $('&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'+place.woeid+'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'+place.name+'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'+place.admin1.content+'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;')&lt;br /&gt;        .appendTo('#output');&lt;br /&gt;      } else {&lt;br /&gt;       var places = data.query.results.place;&lt;br /&gt;       for (var p in places) {&lt;br /&gt;        place = places[p];&lt;br /&gt;        $('&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'+place.woeid+'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'+place.name+'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'+place.admin1.content+'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;')&lt;br /&gt;         .appendTo('#output');&lt;br /&gt;       }&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;    );&lt;br /&gt;   }&lt;br /&gt;  &amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;/head&amp;gt;&lt;br /&gt; &amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;table style='height:100%;width:100%;'&amp;gt;&lt;br /&gt;   &amp;lt;tr style='height:50%;'&amp;gt;&lt;br /&gt;    &amp;lt;td valign='middle'&amp;gt;&lt;br /&gt;     &amp;lt;center&amp;gt;&lt;br /&gt;      Place Name or ZIP:&lt;br /&gt;      &amp;lt;input type='text' id='place' /&amp;gt;&lt;br /&gt;      &amp;lt;br&amp;gt;&lt;br /&gt;      &amp;lt;button onClick='lookup_woeid()'&amp;gt;find it&amp;lt;/button&amp;gt;&lt;br /&gt;     &amp;lt;/center&amp;gt;&lt;br /&gt;    &amp;lt;/td&amp;gt;&lt;br /&gt;   &amp;lt;/tr&amp;gt;&lt;br /&gt;   &amp;lt;tr&amp;gt;&lt;br /&gt;    &amp;lt;td&amp;gt;&lt;br /&gt;     &amp;lt;center&amp;gt;&lt;br /&gt;      &amp;lt;table border='1px'&amp;gt;&lt;br /&gt;       &amp;lt;thead&amp;gt;&lt;br /&gt;        &amp;lt;tr&amp;gt;&lt;br /&gt;         &amp;lt;th&amp;gt;WOEID&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Place&amp;lt;/th&amp;gt;&lt;br /&gt;        &amp;lt;/tr&amp;gt;&lt;br /&gt;       &amp;lt;/thead&amp;gt;&lt;br /&gt;       &amp;lt;tbody id='output'&amp;gt;&lt;br /&gt;       &amp;lt;/tbody&amp;gt;&lt;br /&gt;      &amp;lt;/table&amp;gt;&lt;br /&gt;     &amp;lt;/center&amp;gt;&lt;br /&gt;    &amp;lt;/td&amp;gt;&lt;br /&gt;   &amp;lt;/tr&amp;gt;&lt;br /&gt;  &amp;lt;/table&amp;gt;&lt;br /&gt; &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/wxUi2MCs1Yk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/9176299795558396236/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=9176299795558396236&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/9176299795558396236?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/9176299795558396236?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/wxUi2MCs1Yk/day-glow-background-for-ubuntu_20.html" title="Day Glow Background for Ubuntu" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/12/day-glow-background-for-ubuntu_20.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIEQ3kyfyp7ImA9Wx5aE04.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-4836686276164762230</id><published>2010-11-09T12:14:00.000-08:00</published><updated>2010-11-09T12:28:22.797-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-09T12:28:22.797-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="work" /><category scheme="http://www.blogger.com/atom/ns#" term="ajax" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>Cross-Origin Javascripting with PHP</title><content type="html">I had an awesome moment of WIN today when my boss asked me if we could add a drop-down selector to a SharePoint form that was populated with information from an SQL database.  I have already set up my LAMP server to talk to the SQL database so I figured the easiest way to get this done would be to have an Ajax request sent to my LAMP server and forward that on to the SQL server and return the results to the SharePoint form. &lt;br /&gt;&lt;br /&gt;Simple right?&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Except that my LAMP server is on a different domain than the SharePoint server so that would classify as Cross-Origin and my Ajax would fail.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After a bit of research, I found that I can manipulate the headers sent out by the PHP pages served by my LAMP server to allow for Cross-Origin scripting!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's how:&lt;br&gt;&lt;div style='font-family:monospace;'&gt;http://LAMP/sql.php&lt;/div&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;header('Access-Control-Allow-Origin: http://sharepoint/');&lt;br /&gt;...&lt;br /&gt;# more PHP to query the SQL server &amp;amp; build the resulting page&lt;br /&gt;...&lt;/pre&gt;&lt;div style='font-family:monospace;'&gt;http://SharePoint/List/NewForm.aspx (in CEWP)&lt;/div&gt;&lt;pre&gt;&amp;lt;script src='jquery.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt; ...&lt;br /&gt; $('#drop-down_id').load('http://LAMP/sql.php');&lt;br /&gt; ...&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/cNNCA1noTa0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/4836686276164762230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=4836686276164762230&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4836686276164762230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4836686276164762230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/cNNCA1noTa0/cross-origin-javascripting-with-php.html" title="Cross-Origin Javascripting with PHP" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/11/cross-origin-javascripting-with-php.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUACRng7fSp7ImA9Wx5bGU0.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-6269781304083815985</id><published>2010-11-04T13:42:00.000-07:00</published><updated>2010-11-04T13:49:27.605-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-04T13:49:27.605-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="work" /><category scheme="http://www.blogger.com/atom/ns#" term="family" /><title>jQuery Manipulation of SharePoint Lists</title><content type="html">&lt;div&gt;Wooh, it's been a while.  Adding a new kiddo to the family has had a ripple-effect on my online activity as I've been busy with family and catching up at work.  Hopefully, I'll be able to start posting regularly again now that things are starting to become routine again.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;I got an email earlier today asking about how to do some manipulation of a list in SharePoint using jQuery.  As I was answering the question, it occurred to me that I had done this once before with vanilla JavaScript and I was curious to see how much less code I could write to accomplish the same thing.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's what I came up with:&lt;pre&gt;&amp;lt;script src='jquery.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;var col_names = [];&lt;br /&gt;var tbl_id = ''; // the id for the table that you want to manipulate goes here&lt;br /&gt;tbl_id = tbl_id.replace(/{/g,'\\{').replace(/}/g,'\\}'); // cleanup to handle the curly braces&lt;br /&gt; &lt;br /&gt;$(document).ready(function() {&lt;br /&gt; $('#'+tbl_id+' &amp;gt; tbody &amp;gt; tr &amp;gt; th').each(function() {&lt;br /&gt;  if ($(this).hasClass('ms-vh-icon')) { col_names.push('Attachments'); }&lt;br /&gt;  /** OTHER 'else if' statements may be required to handle future columns without text names **/&lt;br /&gt;  else { col_names.push($(this).text()); }&lt;br /&gt;  $(this).attr('COL',col_names[col_names.length-1]);&lt;br /&gt;  $(this).attr('ROW','0');&lt;br /&gt; });&lt;br /&gt; &lt;br /&gt; var c=0;&lt;br /&gt; var r=1; // the header row is row 0&lt;br /&gt; $('#'+tbl_id+' &amp;gt; tbody &amp;gt; tr &amp;gt; td').each(function() {&lt;br /&gt;  $(this).attr('COL',col_names[c]);&lt;br /&gt;  $(this).attr('ROW',r);&lt;br /&gt;  r = (c == col_names.length-1) ? r+1 : r;&lt;br /&gt;  c = (c == col_names.length-1) ? 0 : c+1;&lt;br /&gt; });&lt;br /&gt; build_options();&lt;br /&gt;});&lt;br /&gt; &lt;br /&gt;function hide_cell() {&lt;br /&gt; /**** THIS IS A SAMPLE OF HOW TO ITERATE THROUGH THE ROWS ****/&lt;br /&gt; $('#'+tbl_id+' &amp;gt; tbody &amp;gt; tr').each(function() {&lt;br /&gt;  $(this).find('[COL=&amp;quot;'+$('#cols').val()+'&amp;quot;]').hide();&lt;br /&gt; });&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This code will assign ROW and COL attributes to each cell in a given table with an id of "tbl_id".  These can then be used later in the code to reference a particular cell in your code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/lnyAspn3Ces" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/6269781304083815985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=6269781304083815985&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6269781304083815985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6269781304083815985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/lnyAspn3Ces/jquery-manipulation-of-sharepoint-lists.html" title="jQuery Manipulation of SharePoint Lists" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/11/jquery-manipulation-of-sharepoint-lists.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UERns5cSp7ImA9Wx5REEo.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-4677825551214928263</id><published>2010-08-17T11:49:00.000-07:00</published><updated>2010-08-17T11:53:27.529-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-17T11:53:27.529-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="slacker.com" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><title>Unofficial Slacker Player Chrome Extension</title><content type="html">So I scraped together my coding skills long enough to put together this little Chrome Extension that will launch just the Slacker.com player less all the ads.  It's small, sleek, and functional =)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" &gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;b&gt;&lt;a href="https://chrome.google.com/extensions/search?q=slacker"&gt;Unofficial Slacker Player Chrome Extension&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" &gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;or&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" &gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;a href="https://clients2.google.com/service/update2/crx?response=redirect&amp;amp;x=id%3Ddebdcmniobmfbanfgpacpidnbdjpphhl%26uc%26lang%3Den-US&amp;amp;prod=chrome&amp;amp;prodversion=6.0.472.36"&gt;&lt;b&gt;install it!&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/p0Z_sDeSISw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/4677825551214928263/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=4677825551214928263&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4677825551214928263?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4677825551214928263?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/p0Z_sDeSISw/unofficial-slacker-player-chrome.html" title="Unofficial Slacker Player Chrome Extension" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/08/unofficial-slacker-player-chrome.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4MQ3s6fip7ImA9Wx5TEkg.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-2411063153325090129</id><published>2010-07-27T11:00:00.000-07:00</published><updated>2010-07-27T11:23:02.516-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-27T11:23:02.516-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="work" /><category scheme="http://www.blogger.com/atom/ns#" term="virtualization" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Virtualizing Windows XP to KVM on Ubuntu 10.04</title><content type="html">I've been struggling lately with how to convert an existing physical Windows XP based laptop to a virtualized machine that can be run on KVM.  I've followed a few How-To's and by combining elements of each, I've finally been able to boot the virtualized image, though now I have to re-authenticate (more on that as I figure it out).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Setup:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Virtual Server (VS) - The host server running KVM&lt;/li&gt;&lt;li&gt;Test-Laptop - The WinXP laptop that I'm trying to virtualize&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Procedure:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Follow the steps on &lt;a href="http://support.microsoft.com/kb/314082"&gt;Microsoft's KB&lt;/a&gt; to enable IDE on the WinXP machine.&lt;/li&gt;&lt;li&gt;Download, install, and run &lt;b&gt;VMWare Converter&lt;/b&gt; on the WinXP machine.&lt;/li&gt;&lt;li&gt;I used the defaults with "VMWare Workstation 6.5.x" as the type &amp;amp; stored the resulting image on a file share on the Virtual Server host.&lt;/li&gt;&lt;li&gt;While (or before) the image is being created, download &amp;amp; install VMWare Server on the Virtual Server host.&lt;/li&gt;&lt;li&gt;Once the image of the WinXP machine is created, use &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;b&gt;vmware-vdiskmanager&lt;/b&gt;&lt;/span&gt; to create a single file:&lt;pre&gt;vmware-vdiskmanager -r test-laptop.vmdk -t 0 test-laptop-single.vmdk&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Download the &lt;a href="http://tinyempire.com/notes/files/fixntldriso.zip"&gt;fixntldr.iso&lt;/a&gt; to the Virtual Server host and use it as the boot CD for the image you just created:&lt;pre&gt;kvm -hda test-laptop-single.vmdk -cdrom fixntldr.iso -boot d&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/ClPnJuGlzpw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/2411063153325090129/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=2411063153325090129&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/2411063153325090129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/2411063153325090129?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/ClPnJuGlzpw/virtualizing-windows-xp-to-kvm-on.html" title="Virtualizing Windows XP to KVM on Ubuntu 10.04" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/07/virtualizing-windows-xp-to-kvm-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8ESHoyeSp7ImA9WxFUE08.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-3765102910122839428</id><published>2010-06-23T13:47:00.000-07:00</published><updated>2010-06-23T14:16:49.491-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-23T14:16:49.491-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="snmp" /><category scheme="http://www.blogger.com/atom/ns#" term="work" /><category scheme="http://www.blogger.com/atom/ns#" term="networks" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>snmpset To the Rescue!</title><content type="html">A big, ugly, hairy, monotonous task recently fell in my lap at work.  I had to update a couple configuration settings in approximately 900 menu-driven network devices.  Each device had an independent authentication method with four or five possible username/password combos, and different menu options depending on firmware version.  Completing one box would take about 2-3 minutes.  Multiply that by 900 and you're looking at a solid week of nothing but menu navigation and data entry.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This ranked very high on my "List-of-things-that-make-me-want-to-stab-my-eyes-out".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The disparity of versions and lack of a single configuration standard rendered my usual methods of scripting useless.  A dark little rain cloud settled over my cube.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then my boss made the comment, "These things have SNMP, right?"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I heard, "These things have SNMP &lt;i&gt;write&lt;/i&gt;?"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I immediately started researching and sure enough, I could use the "snmpset" command to script the updates for me!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;WIN!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is a copy of the '&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;bulk_snmpset.sh&lt;/span&gt;&lt;/b&gt;' script that I used to do the updates:&lt;pre&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;while read HOST RWSTR; do&lt;br /&gt;snmpset -v 2c -c $RWSTR $HOST &amp;lt;snmp_oid_here&amp;gt; a "192.168.100.100"&lt;br /&gt;done &amp;lt; $1&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;I fed this script a flat text file (&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;hosts_to_update.txt&lt;/span&gt;&lt;/b&gt;) with the 900 host names and their respective SNMP read/write string that looked like this:&lt;pre&gt;10.10.10.1 SNMPrwSTRING1&lt;br /&gt;10.10.10.2 SNMPrwSTRING2&lt;br /&gt;10.10.10.3 snmpRWstring3&lt;br /&gt;...&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Actually making it worked, looked like this:&lt;pre&gt;me@ubuntu:~/scripts $./bulk_snmpset.sh hosts_to_update.txt&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;All that remained was to capture the ones that failed and either adjust the script accordingly or take care of them manually&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/w31LuXIXDGo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/3765102910122839428/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=3765102910122839428&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3765102910122839428?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3765102910122839428?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/w31LuXIXDGo/snmpset-to-rescue.html" title="snmpset To the Rescue!" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/06/snmpset-to-rescue.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcBR3kyfip7ImA9WxFVFUg.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-6006028295535270220</id><published>2010-06-14T15:15:00.001-07:00</published><updated>2010-06-14T15:20:56.796-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-14T15:20:56.796-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="ajax" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><title>Clever Solution to IE Caching Ajax</title><content type="html">I ran into a problem today where IE was caching my AJAX responses so updates wouldn't be displayed and after a bit of hand-wringing over some of the suggested solutions (swapping GETs for POSTs, re-writing the page inPHP, etc), I found a &lt;a href="http://www.codemiles.com/ajax/solution-to-ajax-cache-problem-with-internet-explorer-t602.html"&gt;clever little solution&lt;/a&gt; - add a time stamp to the GET string.&lt;div&gt;&lt;pre&gt;var t = new Date().getTime();&lt;br /&gt;...&lt;br /&gt;ajaxUrl += '&amp;amp;timestamp='+t;&lt;br /&gt;...&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Adding this time stamp will differentiate the URL and thereby force IE to reload the Ajax content.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Win.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/P3hEbeQtSco" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/6006028295535270220/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=6006028295535270220&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6006028295535270220?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6006028295535270220?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/P3hEbeQtSco/clever-solution-to-ie-caching-ajax.html" title="Clever Solution to IE Caching Ajax" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/06/clever-solution-to-ie-caching-ajax.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAFQ3k5eCp7ImA9Wx9TEE4.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-5623638995641413845</id><published>2010-06-08T11:36:00.000-07:00</published><updated>2010-11-17T13:51:52.720-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-17T13:51:52.720-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><category scheme="http://www.blogger.com/atom/ns#" term="desktop" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="how I roll" /><category scheme="http://www.blogger.com/atom/ns#" term="eeepc" /><category scheme="http://www.blogger.com/atom/ns#" term="conky" /><title>EeePC 701 Conky &amp; World Daylight Wallpaper</title><content type="html">&lt;div&gt;UPDATE!!! 17 NOV 2010 - Recently, a change on the static.die.net site  wget not downloading the actual world map, but just a black picture instead.  It turns out that this only affected wget so to work around this, I've added the option of '-U "pwnd"' to the wget line to send a user-agent string and now it works again!&lt;/div&gt;&lt;br /&gt;&lt;div&gt;I read an &lt;a href="http://lifehacker.com/5556316/set-a-rotating-picture-of-the-earth-as-your-ubuntu-wallpaper"&gt;article on Lifehacker&lt;/a&gt; yesterday about how you can set a day/night rotating map as your desktop background.  At first I was like, "Hey, this is awesome!"  Then I remembered my conky setup and realized that it wouldn't work as it requires a static color background behind the text in order to be visible and the world map is being constantly downloaded and over-writing the image so I was all, "Dangit, that would have been cool =(".  Then I got an idea!  I could use ImageMagick to glue the static conky background on to the world map so I high-fived myself and went, "pwnd!"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&amp;lt;/valley_girl&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Here's what you'll get when you're done:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6IeZdz_xkNM/TA6QYnvpihI/AAAAAAAAAcg/P2PhGwuOozo/s1600/world_desk_800x480_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 240px;" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/TA6QYnvpihI/AAAAAAAAAcg/P2PhGwuOozo/s400/world_desk_800x480_1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5480476549216569874" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;As the day progresses (and provided that you're connected to the internet), the day/night image will be updated every hour.  Additionally, this script will draw a transparent gray band on the newly downloaded world map that you can overlay with your .conkyrc config.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Here's my setup:&lt;br /&gt;&lt;br /&gt;.conkyrc&lt;pre&gt;# This is my conky config, you'll need the&lt;br /&gt;# Envy Code R VS font if you want to match my setup&lt;br /&gt;# otherwise any monospaced font will do&lt;br /&gt;alignment top_middle&lt;br /&gt;border_width 0&lt;br /&gt;default_color AAAAAA #white&lt;br /&gt;draw_outline no&lt;br /&gt;draw_shades no&lt;br /&gt;use_xft yes&lt;br /&gt;gap_x 0&lt;br /&gt;gap_y 250&lt;br /&gt;own_window yes&lt;br /&gt;own_window_title conky&lt;br /&gt;own_window_transparent yes&lt;br /&gt;own_window_hints undecorated, sticky, below, skip_pager, skip_taskbar&lt;br /&gt;double_buffer yes&lt;br /&gt;update_interval 1.0&lt;br /&gt;use_spacer none&lt;br /&gt;short_units yes&lt;br /&gt;draw_graph_borders no&lt;br /&gt;default_outline_color black&lt;br /&gt;use_spacer left&lt;br /&gt;default_bar_size 250 5&lt;br /&gt;&lt;br /&gt;TEXT&lt;br /&gt;${font Envy Code R VS:size=40}${alignc}${time %R}${font Envy Code R VS:size=10}&lt;br /&gt;${alignc}${time %A, %B %e}${font Envy Code R VS:size=8}&lt;br /&gt;${voffset -50}${fs_bar 5, 250 /} sda${alignr}bat ${battery_bar}&lt;br /&gt;${cpubar 5, 250} cpu${alignr}wlan ${wireless_link_bar 5, 250 wlan0}&lt;br /&gt;${membar 5, 250} ram${alignr}${wireless_essid wlan0} ${addr wlan0} - ${upspeed wlan0} / ${downspeed wlan0}&lt;br /&gt;${tab 775,0}${color black}.&lt;/pre&gt;animated_background.sh&lt;pre&gt;#!/bin/bash&lt;br /&gt;# This will download the day/night map and apply the gray band to the top of it&lt;br /&gt;# You'll need to 'sudo apt-get install imagemagick' and&lt;br /&gt;# 'chmod +x ./animated_background.sh' for this script to work&lt;br /&gt;wget -r -U "pwnd" -O 800.jpg http://static.die.net/earth/mercator/800.jpg&lt;br /&gt;convert -size 800x70 xc:'#40404090' ./grey_stripe.png&lt;br /&gt;convert -resize 800x480! ./800.jpg ./800.jpg&lt;br /&gt;composite -geometry -0+255 ./grey_stripe.png 800.jpg ~/Pictures/world.png&lt;br /&gt;rm ./grey_stripe.png ./800.jpg&lt;/pre&gt;Then you'll need to set the script to run hourly using either crontab or gnome-schedule as shown in the Lifehacker link.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers!&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/r6rhke_6asE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/5623638995641413845/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=5623638995641413845&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5623638995641413845?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5623638995641413845?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/r6rhke_6asE/eeepc-701-conky-world-daylight.html" title="EeePC 701 Conky &amp; World Daylight Wallpaper" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_6IeZdz_xkNM/TA6QYnvpihI/AAAAAAAAAcg/P2PhGwuOozo/s72-c/world_desk_800x480_1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/06/eeepc-701-conky-world-daylight.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcCSHw4fCp7ImA9WxFXFEs.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-3917336169710783602</id><published>2010-05-21T11:08:00.000-07:00</published><updated>2010-05-21T11:21:09.234-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-21T11:21:09.234-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><title>Hide the Filtered Column on a SharePoint List Web Part</title><content type="html">Have you ever included a filtered list on one of your SharePoint pages and been incredibly annoyed that you had to show the value that you were filtering on?  Yeah, me too.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's what I did to fix it:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Add a Content Editor Web Part to your page.  Anywhere will do.&lt;/li&gt;&lt;li&gt;In the 'Source Editor...' for that CEWP, paste in this code:&lt;pre&gt;&amp;lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;&lt;br /&gt;$(document).ready(function () {&lt;br /&gt; $('iframe[title=&amp;quot;Hidden frame to filter list&amp;quot;]').each(function() {&lt;br /&gt;  var tbl = ($.browser.msie) ? $(this).parent().parent().parent().parent() : $(this).next();&lt;br /&gt;  var rows = tbl.children('tbody').eq(0).children('tr');&lt;br /&gt;  var cols = rows.eq(0).children('th').length;&lt;br /&gt;  var filter_col = '';&lt;br /&gt;  &lt;br /&gt;  for (var c=0;c&amp;lt;cols;c++) {&lt;br /&gt;   if (rows.eq(0).children('th').eq(c).html().match('/_layouts/images/filter.gif')) {&lt;br /&gt;    filter_col = c;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  if (filter_col &amp;gt; -1) {&lt;br /&gt;   for (var r=0;r&amp;lt;rows.length;r++) {&lt;br /&gt;    rows.eq(r).children('th, td').eq(filter_col).css('display','none');&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; });&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;The code works by detecting the little filter icon and hiding that column from the list.&lt;/li&gt;&lt;li&gt;Yay jQuery!&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Enjoy!&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/zYJZQI7oBQk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/3917336169710783602/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=3917336169710783602&amp;isPopup=true" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3917336169710783602?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3917336169710783602?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/zYJZQI7oBQk/hide-filtered-column-on-sharepoint-list.html" title="Hide the Filtered Column on a SharePoint List Web Part" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>6</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/05/hide-filtered-column-on-sharepoint-list.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQAQXc8cCp7ImA9WxFQGEo.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-1532046511443423518</id><published>2010-05-14T14:17:00.000-07:00</published><updated>2010-05-14T14:25:40.978-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-14T14:25:40.978-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><title>Display a SharePoint List from a Parent Site</title><content type="html">This bit of code will let you take a list from a parent site in your SharePoint hierarchy and display it in your sub-site.  You may have to tweak the code a bit to match your specifications if you have custom code in your list templates, but all you *should* have to mess with is the '&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;#WebPartWPQ2&lt;/span&gt;&lt;/b&gt;' bit.&lt;br /&gt;&lt;br /&gt;Anyway, here it is =)&lt;br /&gt;&lt;pre&gt;&amp;lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;&lt;br /&gt;function get_list() {&lt;br /&gt;var list = $('#list').contents().find('#WebPartWPQ2').children('table').eq(1);&lt;br /&gt;$('#my_list').html(list.html());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;div id='my_list'&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;iframe onLoad='get_list()' id='list' style='display:none;' src='http://path/to/your/list/AllItems.aspx'&amp;gt;&amp;lt;/iframe&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And if you don't like how the list is displayed and you want to remove some of the columns, use this code:&lt;pre&gt;&amp;lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;&lt;br /&gt;function get_list() {&lt;br /&gt;var list = $('#list').contents().find('#WebPartWPQ2').children('table').eq(1);&lt;br /&gt;var rows = list.find('table').eq(0).children('tbody').eq(0).children('tr');&lt;br /&gt;var hide_cols = ['2','3','4','5']; // columns number 2, 3, 4, &amp;amp; 5 will be hidden. Index is 0&lt;br /&gt;for (var r=0;r&amp;lt;rows.length;r++) {&lt;br /&gt; for (var c=0;c&amp;lt;hide_cols.length;c++) {&lt;br /&gt;  rows[r].childNodes[hide_cols[c]].style.display = 'none';&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;$('#my_list').html(list.html());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;div id='my_list'&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;iframe onLoad='get_list()' id='list' style='display:none;' src='http://path/to/your/list/AllItems.aspx'&amp;gt;&amp;lt;/iframe&lt;br /&gt;&lt;/pre&gt;Just be sure to replace the column numbers with the columns you want to hide.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/E_pGJfuG_RE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/1532046511443423518/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=1532046511443423518&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1532046511443423518?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1532046511443423518?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/E_pGJfuG_RE/display-sharepoint-list-from-parent.html" title="Display a SharePoint List from a Parent Site" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/05/display-sharepoint-list-from-parent.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYMR3o4fyp7ImA9WxFRFkk.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-3318989077710503550</id><published>2010-04-30T09:04:00.000-07:00</published><updated>2010-04-30T09:16:26.437-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-30T09:16:26.437-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Upgrading to Ubuntu 10.04 with the Alternate ISO</title><content type="html">My laptop is an Asus EeePC 701.  It's the first generation of modern netbooks and it sports the specs to prove it.  Among the diminutive hardware is a tiny 4GB SSD hard drive and the base Ubuntu install takes up about 2/3 of the drive.  The lack of hard drive space makes it impossible for me to do the upgrade via the Update Manager application bundled with Ubuntu.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The solution?  Download the ISO to an external and upgrade directly from that!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yep, it's that simple.  Here's how:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Download the &lt;a href="http://www.ubuntu.com/getubuntu/downloadmirrors#mirrors"&gt;Alternate Install ISO&lt;/a&gt; (&lt;a href="http://ubuntu.osuosl.org/releases/"&gt;OSU mirror&lt;/a&gt;) to an external flash/hard drive.&lt;/li&gt;&lt;li&gt;Connect the external drive to your lappy and mount the ISO:&lt;pre&gt;sudo mount -o loop /media/external/ubuntu-10.04-alternate-i386.iso /media/cdrom0&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Run the cdromupgrade script:&lt;pre&gt;gksu "sh /cdrom0/cdromupgrade"&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I upgraded from 9.10 and the only thing I had to change was to move the 'Close', 'Minimize', and 'Maximize' buttons back to the right of the windows, which was also easily accomplished:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Open 'gconf-editor'&lt;/li&gt;&lt;li&gt;apps &gt; metacity &gt; general &gt; button_layout = "menu:maximize,minimize,close"&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/Sj6CNO_WJdU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/3318989077710503550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=3318989077710503550&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3318989077710503550?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3318989077710503550?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/Sj6CNO_WJdU/upgrading-to-ubuntu-1004-with-alternate.html" title="Upgrading to Ubuntu 10.04 with the Alternate ISO" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/04/upgrading-to-ubuntu-1004-with-alternate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08EQX4_eSp7ImA9WxFTEEU.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-1326861235212112642</id><published>2010-03-31T17:30:00.000-07:00</published><updated>2010-03-31T17:30:00.041-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-31T17:30:00.041-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><title>Simple JQuery Form Sanitation</title><content type="html">So I'm taking my first stab at publishing code based on JQuery.  To make this code work, you need to have the JQuery script added to your page which is as easy as adding this block of code to the &amp;lt;HEAD&amp;gt; of your page:&lt;pre&gt;&amp;lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;div&gt;Once you've added this line to your page, you can add the following code:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;$(document).ready(function(){ $(':input').blur(function() { $(this).val($(this).val().replace(/&amp;lt;[^&amp;gt;]*&amp;gt;/g,'')); }); });&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Great, so what the heck does that do?  This code will remove any HTML tags from user input on your site so if you want some HTML input, you'll have to modify my code.  Otherwise this will go a long way towards preventing injection attacks on your site.&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/4TCDXyUstkY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/1326861235212112642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=1326861235212112642&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1326861235212112642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1326861235212112642?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/4TCDXyUstkY/simple-jquery-form-sanitation.html" title="Simple JQuery Form Sanitation" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/03/simple-jquery-form-sanitation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMMQX05cSp7ImA9WxBaFkk.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-4862832471016400147</id><published>2010-03-26T11:01:00.000-07:00</published><updated>2010-03-26T14:54:40.329-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-26T14:54:40.329-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><title>SharePoint - Prevent User from Selecting Certain Dates</title><content type="html">I've been getting smart on jQuery a lot lately and haven't had a lot of time to spend on cool new SharePoint hacks, but yesterday I had a request to add this little feature to one of the lists that I manage.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Very generally speaking, the list coordinates network maintenance and we've found that submitters won't check to see if a day is full of maintenance events before they submit a request.  My task was to add a function to the form to check if the day that had been selected was flagged as full.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My solution came in a few steps:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Create a second list that just contains dates that have been flagged as full.  The maintenance coordinators simply add new dates to this list as they fill up.  You'll need to go through the code of this list and pull out the ID attribute for the table.  Load the page in your browser, view the source code, and look for a &lt;b&gt;table tag with the class of "ms-listviewtable"&lt;/b&gt;.  This is the ID that you want to copy.  Also copy the URL for the list.  You'll need to provide both strings to the script below.&lt;/li&gt;&lt;li&gt;Add this JavaScript code to a &lt;b&gt;Content Editor Web Part&lt;/b&gt; on the NewForm.aspx page (using the "&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;&lt;u&gt;NewForm.aspx?ToolPaneView=2&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;" trick) to pull, parse, and compare the dates that have been flagged as full to the dates that have been selected in a date field.&lt;pre&gt;&amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;&lt;br /&gt; var tbl_id = '&lt;span style='background:blue;'&gt;YOUR BIG LONG TABLE ID GOES HERE!!!&lt;/span&gt;';&lt;br /&gt; var url = '&lt;span style='background:blue;'&gt;http://path/to/your/List/AllItems.aspx&lt;/span&gt;';&lt;br /&gt;&lt;br /&gt; function read_locked_dates() {&lt;br /&gt;  var ifm = document.getElementById('locked_days_list');&lt;br /&gt;  if (ifm.src != url) { ifm.src = url; return false; }&lt;br /&gt;  var doc = (ifm.contentWindow) ? ifm.contentWindow.document : ifm.contentDocument;&lt;br /&gt;  var tbl = doc.getElementById(tbl_id);&lt;br /&gt;  var nobrs = tbl.getElementsByTagName('nobr');&lt;br /&gt;  for (var n=0;n&amp;lt;nobrs.length;n++) {&lt;br /&gt;   blocked_dates.push(nobrs[n].innerHTML);&lt;br /&gt;  }  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function insert_date_check() {&lt;br /&gt;  // this will detect manual updates to the date&lt;br /&gt;  var inputs = document.getElementsByTagName('input');&lt;br /&gt;  for (var i=0;i&amp;lt;inputs.length;i++) {&lt;br /&gt;   if (inputs[i].parentNode.className == 'ms-dtinput') {&lt;br /&gt;    if (inputs[i].attachEvent) { inputs[i].attachEvent('onchange',check_this_date); }&lt;br /&gt; else { inputs[i].addEventListener('change',check_this_date,false); }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  // this will detect updates to the dates done via the calendar clicker&lt;br /&gt;  var ifms = document.getElementsByTagName('iframe');&lt;br /&gt;  for (var i=0;i&amp;lt;ifms.length;i++) {&lt;br /&gt;   if (ifms[i].getAttribute('title').match(/Select a date from the calendar./i)) {&lt;br /&gt;    if (ifms[i].attachEvent) { ifms[i].attachEvent('onload',check_this_date); }&lt;br /&gt; else { ifms[i].addEventListener('click',check_this_date); }&lt;br /&gt;   }&lt;br /&gt;  }  &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; function check_this_date() {&lt;br /&gt;  var picked_dates = [];&lt;br /&gt;  var dates = document.getElementsByTagName('input');&lt;br /&gt;  for (var d=0;d&amp;lt;dates.length;d++) {&lt;br /&gt;   if (dates[d].id.match(/DateTimeField/i)) {&lt;br /&gt;    picked_dates.push(dates[d].value);&lt;br /&gt; for (var b=0;b&amp;lt;blocked_dates.length;b++) {&lt;br /&gt;  if (dates[d].value == blocked_dates[b]) {&lt;br /&gt;   dates[d].style.background = 'red';&lt;br /&gt;   dates[d].value = 'date blocked';&lt;br /&gt;   return false;&lt;br /&gt;  } else {&lt;br /&gt;   dates[d].style.background = '';&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; var out = document.getElementById('output');&lt;br /&gt; var blocked_dates = [];&lt;br /&gt; _spBodyOnLoadFunctionNames.push('read_locked_dates');&lt;br /&gt; _spBodyOnLoadFunctionNames.push('insert_date_check');&lt;br /&gt; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Once you've added this to your NewForm.aspx page, anytime someone tries to edit a date field, it will check the date they've picked against the list you provide &amp;amp; prevent them from picking the date if it's flagged.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers!&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/lkErz4Q6fms" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/4862832471016400147/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=4862832471016400147&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4862832471016400147?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4862832471016400147?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/lkErz4Q6fms/sharepoint-prevent-user-from-selecting.html" title="SharePoint - Prevent User from Selecting Certain Dates" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/03/sharepoint-prevent-user-from-selecting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4FRX86eCp7ImA9WxBUFUo.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-2172617668551588526</id><published>2010-03-02T16:34:00.000-08:00</published><updated>2010-03-02T16:41:54.110-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-02T16:41:54.110-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="ajax" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title>Simple AJAX Progress Bar</title><content type="html">Below is some sample code that I'm posting to help point other developers in the right direction when attempting to create a progress bar for an AJAX function.  This isn't 100% or even cross-browser compatible exactly, but I have tested it successfully on the current stable Chrome release.&lt;br /&gt;&lt;br /&gt;Say you have a '&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;for&lt;/span&gt;&lt;/b&gt;' loop that runs an AJAX function for every item in an array and you want to view the progress of the function.  Here's how I solved that problem:&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt; &amp;lt;title&amp;gt;&lt;br /&gt; &amp;lt;/title&amp;gt;&lt;br /&gt; &amp;lt;script type='text/javascript'&amp;gt;&lt;br /&gt;  function startAjax() {&lt;br /&gt;   // ... define yourArray[] for AJAX processing&lt;br /&gt; for (var i=0;i&amp;lt;yourArray.length;i++) {&lt;br /&gt;  // loop through each item in the array and perform an AJAX process on it.&lt;br /&gt;  setTimeout('onReadyStateChangeFn("'+(Number(i)/Number(yourArray.length))*100+'%")',1000);&lt;br /&gt; }&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  function onReadyStateChangeFn(perc) {&lt;br /&gt;   // ...&lt;br /&gt;   if (ajaxObj.readyState == 4 &amp;amp;&amp;amp; ajax.status == 200) {&lt;br /&gt;  // ... your ajax-handling code here&lt;br /&gt;  document.getElementById('pbar_bar').style.width = perc;&lt;br /&gt;  // ... any additional code&lt;br /&gt; }&lt;br /&gt;  }&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt; &amp;lt;div id='pbar_frame' style='background:red;border:1px black solid;width=100%;height:1em;'&amp;gt;&lt;br /&gt;  &amp;lt;div id='pbar_bar' style='background:lime;width:0%;height:1em;'&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;The key ingredient was '&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;setTimeout()&lt;/span&gt;&lt;/b&gt;', without it, the page would appear to hang while the '&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;for&lt;/span&gt;&lt;/b&gt;' loop executed.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/Qm35JBUfhp0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/2172617668551588526/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=2172617668551588526&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/2172617668551588526?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/2172617668551588526?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/Qm35JBUfhp0/simple-ajax-progress-bar.html" title="Simple AJAX Progress Bar" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/03/simple-ajax-progress-bar.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EERHk6eSp7ImA9WxBUEE8.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-7297628804466023112</id><published>2010-02-23T17:30:00.000-08:00</published><updated>2010-02-24T08:40:05.711-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-24T08:40:05.711-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="getting things done" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="gtd" /><title>Simple BASH Progress Bar Function</title><content type="html">A recent task at work had me work up a script to automate an extremely repetitive and boring task that had approximately 1700 iterations.  That means:&lt;div&gt;&lt;ol&gt;&lt;li&gt;Load a web page&lt;/li&gt;&lt;li&gt;Copy/paste two pieces of information into Excel&lt;/li&gt;&lt;li&gt;Repeat ...&lt;/li&gt;&lt;li&gt;... 1700+ times&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Luckily I was able to script the whole process so it took me about 30 minutes of building the script and then about 2.5 hours of letting the script run in the background.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;During that 2.5 hours, I found myself wondering "Gosh, is that thing done yet!?" and wishing that I had some way to tell how close it was to being done.  So I used that time to build a small BASH function that will give a progress bar in your terminal window to show the progress of a given script.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use it, you just need to paste the function into the top of your script and then in your &lt;b&gt;for&lt;/b&gt; or &lt;b&gt;while&lt;/b&gt; loop, add the line below and it will build the bar for you.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;showBar $&amp;lt;counter variable&amp;gt; $&amp;lt;total iterations&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;And here is the code:&lt;pre&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;function showBar {&lt;br /&gt; percDone=$(echo 'scale=2;'$1/$2*100 | bc)&lt;br /&gt; barLen=$(echo ${percDone%'.00'})&lt;br /&gt; bar=''&lt;br /&gt; fills=''&lt;br /&gt; for (( b=0; b&amp;lt;$barLen; b++ ))&lt;br /&gt; do&lt;br /&gt;  bar=$bar"="&lt;br /&gt; done&lt;br /&gt; blankSpaces=$(echo $((100-$barLen)))&lt;br /&gt; for (( f=0; f&amp;lt;$blankSpaces; f++ ))&lt;br /&gt; do&lt;br /&gt;  fills=$fills"_"&lt;br /&gt; done&lt;br /&gt; clear&lt;br /&gt; echo '['$bar'&amp;gt;'$fills'] - '$barLen'%'&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;The example below shows how to include the &lt;b&gt;showBar&lt;/b&gt; function in a &lt;b&gt;for&lt;/b&gt; loop:&lt;pre&gt;for (( i=0; i&amp;lt;=245; i++ ))&lt;br /&gt;do&lt;br /&gt; showBar $i 245&lt;br /&gt;done&lt;/pre&gt;I wouldn't be at all surprised if there is a better, more elegant way to accomplish this, but this is how I did it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers!&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/CWesmITPYBk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/7297628804466023112/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=7297628804466023112&amp;isPopup=true" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/7297628804466023112?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/7297628804466023112?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/CWesmITPYBk/simple-bash-progress-bar-function.html" title="Simple BASH Progress Bar Function" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/02/simple-bash-progress-bar-function.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQHSXw8eip7ImA9WxBWGU8.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-4027672940200093390</id><published>2010-02-11T13:06:00.000-08:00</published><updated>2010-02-11T13:22:18.272-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-11T13:22:18.272-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Multi-Dimensional Associative Arrays in BASH ... Sort of...</title><content type="html">&lt;div&gt;I found this little gem of BASH scripting today and wanted to share it here, mostly because I find that it fills a function that I'm constantly trying to remember, "How did I do that in the last script I wrote?"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NOTE - If you know a better way to accomplish this task, please let me know!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following snippet of code will let you loop through a delimited text file (commas, semi-colons, tab, etc.) and assign the values to variables for scripting goodness.  For this example, assume that I'm using the following source file: &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;b&gt;MyIps.csv&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;192.168.1.1,My Linksys&lt;br /&gt;192.168.1.2,My Server&lt;br /&gt;192.168.1.3,My Desktop&lt;br /&gt;192.168.1.4,My Laptop&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;Using this as a source file, this is the script that will let me loop through the file as though it were a multi-dimensional associative array:&lt;/div&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;OLD_IFS=$IFS&lt;br /&gt;IFS=','&lt;br /&gt;while read ip desc # these are the various items in the MyIps.csv&lt;br /&gt;do&lt;br /&gt;echo $ip' - '$desc&lt;br /&gt;done &amp;lt; MyIps.csv&lt;br /&gt;IFS=$OLD_IFS&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;Obviously, if your source file uses a delimiter other than a comma, you'll have to modify the script to accommodate for that.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/q2dlT2MoEgI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/4027672940200093390/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=4027672940200093390&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4027672940200093390?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/4027672940200093390?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/q2dlT2MoEgI/multi-dimensional-associative-arrays-in.html" title="Multi-Dimensional Associative Arrays in BASH ... Sort of..." /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/02/multi-dimensional-associative-arrays-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IESHY5cCp7ImA9WxBXEUU.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-1375675474658075131</id><published>2010-01-22T09:27:00.000-08:00</published><updated>2010-01-22T10:38:29.828-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-22T10:38:29.828-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title>Tabs Web Part</title><content type="html">Before I get too far into this, let me first shine a light on another "tabbing" solution that was published a while ago by Christophe at &lt;a href="http://www.pathtosharepoint.com/pages/easyTabs.aspx"&gt;Path to Sharepoint&lt;/a&gt; that, I feel, is a much more polished tabbing solution than this one.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The reason that I'm bothering putting any work into my own tabbing solution is that I'm more of a hobby hacker than a professional developer and I like to come up with solutions that don't require a great deal of ... shall we say ... coordination with third-parties.  I'm unclear as to the privilege requirements needed to use Christophe's Easy Tabs Web Part, but I know that if I can add a web part to a page, I can implement this code without having to ask an admin to install anything for me.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6IeZdz_xkNM/S1nvq6AMOfI/AAAAAAAAAbM/HnD0wErm-0E/s1600-h/tabbing1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 150px;" src="http://3.bp.blogspot.com/_6IeZdz_xkNM/S1nvq6AMOfI/AAAAAAAAAbM/HnD0wErm-0E/s400/tabbing1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5429634346175445490" /&gt;&lt;/a&gt;So here's an example of what you'll end up with after pasting the code below into a Content Editor Web Part.  And here's the code:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&amp;lt;span id='skip_this'&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;style type='text/css'&amp;gt;&lt;br /&gt;.tab {&lt;br /&gt; float:left;&lt;br /&gt; color:darkgray;&lt;br /&gt; margin:0px 3px -1px 3px;&lt;br /&gt; padding:0px 3px -1px 3px;&lt;br /&gt; border:1px black solid;&lt;br /&gt; border-bottom:1px white solid;&lt;br /&gt; font-size:1.5em;&lt;br /&gt; cursor:pointer;&lt;br /&gt;}&lt;br /&gt;.actTab {&lt;br /&gt; float:left;&lt;br /&gt; font-size:1.5em;&lt;br /&gt; margin:0px 3px -2px 3px;&lt;br /&gt; padding:0px 3px -2px 3px;&lt;br /&gt; border:1px black solid;&lt;br /&gt; border-top:2px black solid;&lt;br /&gt; border-bottom:2px white solid;&lt;br /&gt; cursor:pointer;&lt;br /&gt; position:relative;&lt;br /&gt; z-index:10;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id='wpFrame' style='height:100%;width:100%;background:;'&amp;gt;&lt;br /&gt; &amp;lt;div id='wpTabs' style='width:100%;background:;float:left;'&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div id='wpBody' style='width:100%;border:1px black solid;float:left;'&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;// This will check to see if the page is not being edited, collect all the Web Parts on the page and put them in the Tab Format&lt;br /&gt;// Also, you may specify, by Web Part Title, which Web Parts you would like to exclude from the Tab Format.&lt;br /&gt;if (!document.getElementById(&amp;quot;ctl00_WSSDesignConsole_IdDesignModeConsole_DesignModeContainer&amp;quot;)) {&lt;br /&gt; _spBodyOnLoadFunctionNames.push(&amp;quot;setupTabs&amp;quot;);&lt;br /&gt; var webTabs=[];&lt;br /&gt; var webParts=[];&lt;br /&gt; var wpsToSkip=[''];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function setupTabs() {&lt;br /&gt; var theTDs = document.getElementsByTagName('TD'); // collect all the TDs on the page&lt;br /&gt; var wpTabs = document.getElementById('wpTabs'); // the DIV where the tabs will be added&lt;br /&gt; var wpBody = document.getElementById('wpBody') // the DIV where the Web Part content will be added&lt;br /&gt; for (var t=0;t&amp;lt;theTDs.length;t++) { // loop through all the TDs on the page&lt;br /&gt;  var i = theTDs[t].id;&lt;br /&gt;  if (i.match(/WebPartTitleWPQ/)) { // if it's a Web Part&lt;br /&gt;   var title = (theTDs[t].innerText || theTDs[t].textContent).replace(/[\n\r]/g,&amp;quot;&amp;quot;);&lt;br /&gt;   i = i.substr(i.indexOf(&amp;quot;WPQ&amp;quot;));&lt;br /&gt;   var wpBod = document.getElementById(&amp;quot;WebPart&amp;quot;+i);&lt;br /&gt;   if (wpsToSkip.join().match(title) || // skip Web Parts that have been excluded&lt;br /&gt;    wpBod.firstChild.id == 'skip_this') { // skip the CEWP that holds this code&lt;br /&gt; continue; // skip it&lt;br /&gt;   } else {&lt;br /&gt;    wpsToSkip.push(title); // add the Web Part being incorporated to the skip list to prevent duplication&lt;br /&gt;   }&lt;br /&gt;   // build a tab for the Web Part&lt;br /&gt;   var newTab = document.createElement(&amp;quot;DIV&amp;quot;);&lt;br /&gt;   newTab.innerHTML = title;&lt;br /&gt;   newTab.className = 'ms-WPTitle tab';&lt;br /&gt;   newTab.id = i;&lt;br /&gt;   addEv(newTab);&lt;br /&gt;   wpTabs.appendChild(newTab);&lt;br /&gt;   webTabs.push(newTab);&lt;br /&gt;   // incorporate the body into the tabbed display&lt;br /&gt;   wpBody.appendChild(wpBod);&lt;br /&gt;   wpBod.style.display = &amp;quot;none&amp;quot;;&lt;br /&gt;   webParts.push(wpBod);&lt;br /&gt;   document.getElementById(&amp;quot;MSOZoneCell_WebPart&amp;quot;+i).style.display = &amp;quot;none&amp;quot;;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function showHide() {&lt;br /&gt; var i = event.srcElement.id;&lt;br /&gt; for (var t=0;t&amp;lt;webTabs.length;t++) { // bring the proper tab to the front&lt;br /&gt;  webTabs[t].className = (webTabs[t].id.match(i)) ? &amp;quot;ms-WPTitle actTab&amp;quot; : &amp;quot;ms-WPTitle tab&amp;quot;;&lt;br /&gt; }&lt;br /&gt; for (var w=0;w&amp;lt;webParts.length;w++) { // display the body element for the tab selected &amp;amp; hide the rest&lt;br /&gt;  webParts[w].style.display = (webParts[w].id.match(i)) ? &amp;quot;&amp;quot; : &amp;quot;none&amp;quot;;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function addEv(o) {&lt;br /&gt; if (o.addEventListener) {&lt;br /&gt;  o.addEventListener(&amp;quot;click&amp;quot;,showHide,false);&lt;br /&gt; } else if (o.attachEvent) {&lt;br /&gt;  o.attachEvent(&amp;quot;onclick&amp;quot;,showHide);&lt;br /&gt; } else {&lt;br /&gt;  o.onclick = showHide;&lt;br /&gt; }&lt;br /&gt; return o;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt&lt;/pre&gt;Enjoy!&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/I-aYqlepwPo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/1375675474658075131/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=1375675474658075131&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1375675474658075131?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/1375675474658075131?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/I-aYqlepwPo/tabs-web-part.html" title="Tabs Web Part" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_6IeZdz_xkNM/S1nvq6AMOfI/AAAAAAAAAbM/HnD0wErm-0E/s72-c/tabbing1.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2010/01/tabs-web-part.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8EQX4-eyp7ImA9WxBREEg.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-6753985747390223268</id><published>2009-12-28T18:30:00.000-08:00</published><updated>2009-12-28T18:30:00.053-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-28T18:30:00.053-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="ssh" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><category scheme="http://www.blogger.com/atom/ns#" term="networks" /><category scheme="http://www.blogger.com/atom/ns#" term="phone" /><category scheme="http://www.blogger.com/atom/ns#" term="eris" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="eeepc" /><title>Tethering your non-rooted Android-based phone</title><content type="html">My last article detailed how to use the Proxoid application on your Android-based phone which is all well and good, but you're stuck with HTTP and any protocols that can be tunneled over HTTP.&lt;br /&gt;&lt;br /&gt;Thanks to ConnectBot, that's not a problem any more.&lt;br /&gt;&lt;br /&gt;ConnectBot is a free(!) SSH client for Android that is capable of port-forwarding.  Using ConnectBot and adb (from the Android SDK), it's possible to connect your laptop to ports on remote servers.&lt;br /&gt;&lt;br /&gt;For example, at the end of this tutorial, you should be able to securely tunnel your web traffic over an SSH tunnel and your Android phone!  But don't stop there, if your geek-fu is strong enough, you can connect to any number of services/servers via your phone's 3G connection.&lt;br /&gt;&lt;br /&gt;Here's how to set up the SSH tunnel for web browsing:&lt;br /&gt;Need to have:&lt;pre&gt;1 - A laptop with:&lt;br /&gt; a - SSH client - sudo apt-get install openssh-client&lt;br /&gt; b - Web browser - http://google.com/chrome&lt;br /&gt; c - Android SDK - http://developer.android.com/sdk/index.html&lt;br /&gt;2 - Android-based phone with ConnectBot installed&lt;br /&gt;3 - An SSH server with a public IP address&lt;/pre&gt;My setup:&lt;pre&gt;1 - [Lappy] - Asus EeePC701 w/ Ubuntu 9.04&lt;br /&gt;2 - Droid [Eris]&lt;br /&gt;3 - [Desky] - VirtualBox on home PC running Ubuntu 9.10&lt;/pre&gt;Connections to be made:&lt;pre&gt;0 - [Lappy]--(usb cable)---[Eris]&lt;br /&gt;1 - [Lappy]---(./adb forward tcp:10022 tcp:10022)---[Eris]&lt;br /&gt;2 - [Eris]---(ConnectBot port fwd:local, 10022, localhost:22)---[Desky SSH Server]&lt;br /&gt;3 - [Lappy]---(ssh -D 9090 localhost -p 10022)---[Desky SSH Server]&lt;br /&gt;4 - [Browser on Lappy]---(proxy socks, port 9090)---[Desky SSH Server]&lt;/pre&gt;So what the heck does all that stuff do?  Let me explain:&lt;br /&gt;0 - Plug your laptop into your phone with the USB cable.  On Linux machines, I've found it necessary to start the "HTC Sync" application on the phone.  Otherwise the adb application was unable to connect to the phone.&lt;br /&gt;1 - From the command line on the Lappy, you're initiating the adb connection.  This will forward ports on your laptop to ports on your phone.  In our case, we're forwarding port 10022 on the laptop to port 10022 on the phone.&lt;br /&gt;2 - From ConnectBot on the Eris, we're creating a SSH port-forward from port 10022 on the phone to port 22 on my SSH server.  Now, any connections made to port 10022 on the Lappy will be forwarded to the phone which will, in turn, be forwarded to port 22 on the SSH server.&lt;br /&gt;3 - From the command line on the Lappy, open a dynamic port forward on port 9090 on the Lappy to 'localhost' (a.k.a. the Lappy) on port 10022 (which is being forwarded to the SSH server port 22).&lt;br /&gt;4 - In your browser on the Lappy, point it to use a SOCKS proxy of 'localhost' port 9090.  Now when you hit "http://google.com" in your browser, it will be sent to port 9090 on your Lappy, which is tunneled over port 10022 on your lappy, which is forwarded to port 10022 on your phone, which is forwarded to port 22 on your SSH server, which is the end point for the dynamic port-forward on port 9090.  Got all that?  If you're a visual person, try this:&lt;pre&gt;[Lappy Browser]&lt;br /&gt; \&lt;br /&gt; (SOCKS proxy - localhost:9090)&lt;br /&gt;  \&lt;br /&gt;  (ssh -D 9090 localhost -p 10022)&lt;br /&gt;   \&lt;br /&gt;   (./adb forward tcp:10022 tcp:10022)&lt;br /&gt;    \&lt;br /&gt;    [Eris]&lt;br /&gt;     \&lt;br /&gt;     (ConnectBot port fwd - local, 10022, localhost:22)&lt;br /&gt;      \&lt;br /&gt;      [SSH Server]&lt;br /&gt;       \&lt;br /&gt;       plain old internet&lt;/pre&gt;&lt;br /&gt;If you REALLY want to have some fun, connect your Lappy to your iperf server and you'll be able to check your bandwidth as you go =)  I averaged about 200kb/s&lt;pre&gt;1 - [Lappy]---(./adb forward tcp:15001 tcp:15001)---[Eris]&lt;br /&gt;2 - [Eris]---(ConnectBot fwd:local, 15001, iperf_server:5001)---[Desky]&lt;br /&gt;3 - [Lappy] $ iperf -c localhost -P 15001&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Have fun and merry Christmas/Happy New Year! =)&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/gxRTVI3djv4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/6753985747390223268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=6753985747390223268&amp;isPopup=true" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6753985747390223268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6753985747390223268?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/gxRTVI3djv4/tethering-your-non-rooted-android-based.html" title="Tethering your non-rooted Android-based phone" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/tethering-your-non-rooted-android-based.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QEQX0ycCp7ImA9WxBSFUw.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-3983553706974515348</id><published>2009-12-22T12:55:00.000-08:00</published><updated>2009-12-22T12:55:00.398-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-22T12:55:00.398-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="misc" /><category scheme="http://www.blogger.com/atom/ns#" term="sip" /><category scheme="http://www.blogger.com/atom/ns#" term="google voice" /><category scheme="http://www.blogger.com/atom/ns#" term="eris" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><category scheme="http://www.blogger.com/atom/ns#" term="how I roll" /><title>Google Voice via SIP! (w/o Gizmo5)</title><content type="html">If you were one of those people lucky enough to get a Gizmo5 account set up before Google bought it, you can ignore this post.  If, however, you are like me and you want to be able to use your Google Voice number on a SIP softphone, read on.&lt;br /&gt;&lt;br /&gt;First, a quick "so what" about the whole thing.  At the end of this how-to, you should be able to place and receive free phone calls using a normal Plain Old Telephone System (POTS) number.  Yep, place and receive.  For free.&lt;br /&gt;&lt;br /&gt;Second, a hat-tip to Bernal Schooley for the &lt;a href="http://googlevoices.blogspot.com/2009/04/google-voice-to-gizmo-with-x-lite.html"&gt;X-Lite registration&lt;/a&gt; tip!&lt;br /&gt;&lt;br /&gt;Here's what you'll need in order to put this all together:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A Google Voice account (invite, free)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A VOIP/SIP capable device (computer, iPod, &lt;span style="font-weight: bold;"&gt;Droid&lt;/span&gt;, etc.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;An always-on broadband connection&lt;/li&gt;&lt;/ul&gt;Ok, so you have to pay for those last two things, but the phone service is free.&lt;br /&gt;&lt;br /&gt;Once you have these three things, everything else is just a matter of filling out the proper online forms and such.  Here is the list of other services that you'll need to sign up for in order to make the POTS to SIP transfer:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An IPKall.com account (free)&lt;/li&gt;&lt;li&gt;A PBXes.org account (free)&lt;/li&gt;&lt;li&gt;X-Lite SIP Softphone (free)&lt;/li&gt;&lt;/ul&gt;And now the caveats:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This may not be the best or most elegant method, but it works.&lt;/li&gt;&lt;li&gt;When/If GV finally releases their own SIP method (via the acquisition of Gizmo5), this method should be abandoned &amp;amp; you should use the native GV method.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Quality may be dodgy and there are a number of settings tweaks that can improve or harm your sound quality.  Most of these settings changes can be tweaked in your SIP softphone.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you find a better way, please share it with us here.  It's about doing things better, not doing things my way.&lt;/li&gt;&lt;li&gt;I made a lot of configuration settings changes in my quest to get this working so if you encounter a road block, let me know as I may have simply neglected to include a certain setting in my documentation.&lt;/li&gt;&lt;li&gt;This is not a supported solution.  It's very much held together with chewing gum &amp;amp; duct tape.&lt;/li&gt;&lt;li&gt;Each of the services that link together to give you your free phone service is a free service and may decide to stop being free at any time.&lt;/li&gt;&lt;/ul&gt;And now, the fun =)&lt;br /&gt;&lt;pre&gt;Step 1 - PBXes.org&lt;br /&gt;1a - Create account&lt;br /&gt;1b - Create an Extension&lt;br /&gt;1b1 - SIP (click)&lt;br /&gt;1b2 - Extension Number: 100&lt;br /&gt;1b3 - Display Name: (anything)&lt;br /&gt;1b4 - Password: (pick a password)&lt;br /&gt;1b5 - Voicemail: disabled&lt;br /&gt;1b6 - After creating your extension, open it up and make these changes:&lt;br /&gt; 1b6a - dtmfmode: rfc2833&lt;br /&gt; 1b6b - audio bypass: no&lt;br /&gt;1c - Add a Ring Group&lt;br /&gt;1c1 - Group: 1&lt;br /&gt;1c2 - ring strategy: ringall&lt;br /&gt;1c3 - extension list: 100&lt;br /&gt;1c4 - ring time: 60&lt;br /&gt;1c5 - Destination if no answer: Extension [(anything) &lt;100&gt;]&lt;br /&gt;1d - Add an Inbound Route&lt;br /&gt;1d1 - Trunk: yourPBXes.orgUsername-100&lt;br /&gt;1d2 - Destination: Extension: [(anything) &lt;100&gt;]&lt;/pre&gt;Congratulations, you now have your very own SIP extension.  You should now be able to call other SIP phones, but let's not stop there, let's hook into the POTS network so you can call any phone!&lt;br /&gt;&lt;pre&gt;Step 2 - phone.ipkall.com&lt;br /&gt;2a - type: SIP&lt;br /&gt;2b - area code: pick your prefix&lt;br /&gt;2c - SIP Phone number: yourPBXes.orgUsername-100&lt;br /&gt;2d - SIP Proxy: pbxes.org&lt;br /&gt;2e - Email: youremail&lt;br /&gt;2f - Password: yourPBXes.orgPassword&lt;br /&gt;2g - Check your email for your SIP phone number&lt;/pre&gt;This phone number is able to receive calls from POTS phones.  If you've done it right, you should be able to call this number and have your SIP softphone ring.  Oh, but you'll need to set up a SIP softphone first, here's how:&lt;br /&gt;&lt;pre&gt;Step 3 - Install X-Lite&lt;br /&gt;3a - Download and install X-Lite: http://www.counterpath.com/x-lite-download.html&lt;br /&gt;3b - Set up your PBXes.org account:&lt;br /&gt;3b1 - Display Name: PBXes.org&lt;br /&gt;3b2 - User name: yourPBXes.orgUsername-100&lt;br /&gt;3b3 - Password: yourPBXes.orgPassword&lt;br /&gt;3b4 - Domain: pbxes.org&lt;br /&gt;3b5 - Check for voice mail: unchecked&lt;br /&gt;3b6 - You should be connected, if you call your IPKall number it should ring the X-Lite client&lt;br /&gt;3b - After install, launch X-Lite and dial "***7469" to open the config&lt;br /&gt;3b1 - Enter "dtmf" for the filter and make sure "system:dtmf:force_send_in_band" is set to "1"&lt;br /&gt;3b2 - Enter "2833" for the filter and set "rtp:2833:enabled" to "0"&lt;/pre&gt;The last three steps are necessary for registering your number with Google Voice.  The process of registering a SIP phone with Google Voice is a bit tricky at the moment.  There are some differences in how GV interprets the touch tones of the registration code and how SIP softphones encode tones.  Steps 3b, 3b1, &amp;amp; 3b2 should help bridge the gap.&lt;br /&gt;&lt;pre&gt;Step 4 - Add Number to Google Voice&lt;br /&gt;4a - Log in to Google Voice&lt;br /&gt;4b - Settings &gt; Phones &gt; "Add another phone"&lt;br /&gt;4b1 - Name: "SIP"&lt;br /&gt;4b2 - Number: yourIPKallNumber&lt;br /&gt;4b3 - Phone Type: Home (You can change this later)&lt;br /&gt;4b4 - Save&lt;br /&gt;4c - Verify the number&lt;br /&gt;4c1 - Google will call your X-Lite client &amp;amp; ask you for the 2-digit code&lt;br /&gt;4c2 - Click the buttons on the X-Lite pad &amp;amp; your number should be registered&lt;br /&gt;4c3 - You can now make any changes to your GVoice "SIP" profile&lt;/pre&gt;If step 4c doesn't work for you, please let me know!  It took me a LOT of configuration changes to get a combination of settings that finally worked and I grew very accustomed to the Google Voice lady telling me, "Sorry, I didn't understand that.  Please enter the two-digit code from the website."  The settings that you see on this page are the settings that I had when I finally heard her say, "This phone is now registered with Google Voice. Thank you."&lt;br /&gt;&lt;pre&gt;Step 5 - Enjoy!&lt;br /&gt;You should now be able to place a call to your Google Voice number and have the X-Lite (or other SIP softphone) ring.&lt;/pre&gt;When you're done, you should be able to use Google Voice to place a phone call that will first call your SIP phone and then call the number that you were dialing.  For free.&lt;br /&gt;&lt;br /&gt;The connection is as follows:&lt;br /&gt;&lt;pre&gt;Inbound calls:&lt;br /&gt;Caller &gt; GV &gt; IPKall &gt; PBXes &gt; Your SIP softphone&lt;br /&gt;&lt;br /&gt;Outbound calls:&lt;br /&gt;1)                          GV &gt; IPKall &gt; PBXes &gt; Your SIP softphone&lt;br /&gt;2) Phone # you're calling &lt; GV &lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/KierNDvEvyI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/3983553706974515348/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=3983553706974515348&amp;isPopup=true" title="25 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3983553706974515348?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/3983553706974515348?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/KierNDvEvyI/google-voice-via-sip-wo-gizmo5.html" title="Google Voice via SIP! (w/o Gizmo5)" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>25</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/google-voice-via-sip-wo-gizmo5.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIMR3syeip7ImA9WxBSEEo.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-8000030436957866848</id><published>2009-12-16T17:30:00.000-08:00</published><updated>2009-12-17T09:56:26.592-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-17T09:56:26.592-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="proxoid" /><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="ssh" /><category scheme="http://www.blogger.com/atom/ns#" term="networks" /><category scheme="http://www.blogger.com/atom/ns#" term="eris" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="eeepc" /><title>Ubuntu Laptop Tethered to Droid Eris via Proxoid</title><content type="html">I finally got it sorted out and I can now connect my lappy (EeePC 701) through my Eris' internet connection (3G or WiFi).  Technically it's a proxy and not a tether, but IP by any other name is still teh tubes.&lt;br /&gt;&lt;br /&gt;Here's how I got it working:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;The Eris&lt;/span&gt;&lt;br /&gt;   1 - Install "&lt;a href="http://code.google.com/p/proxoid/wiki/installationLinux"&gt;Proxoid&lt;/a&gt;" from the Market&lt;br /&gt;   2 - Configure the port number - I used 8181&lt;br /&gt;   3 - [Optional] Set up your user-agent filter&lt;br /&gt;   4 - Start Proxoid&lt;br /&gt;   5 - Connect your phone to your laptop via USB&lt;br /&gt;   6 - In the alert menu (swipe down from the status bar), tap 'HTC Sync' - you can ignore the fail message&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Lappy&lt;/span&gt;&lt;br /&gt;   1 - Create the following file &lt;pre&gt;$ sudo gedit /etc/dev/rules.d/11-android.rules&lt;/pre&gt; with these two lines:&lt;br /&gt;       &lt;pre&gt;SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bb4", SYSFS{idProduct}=="0c02", MODE="0666", OWNER="yourusername"&lt;br /&gt;SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bb4", SYSFS{idProduct}=="0c01", MODE="0666", OWNER="yourusername"&lt;/pre&gt;&lt;br /&gt;   2 - Restart udev &lt;pre&gt;$ sudo /etc/init.d/udev restart&lt;/pre&gt;&lt;br /&gt;   3 - Download and extract the Android SDK - http://developer.android.com/sdk/index.html&lt;br /&gt;   4 - Install corkscrew &lt;pre&gt;$ sudo apt-get install corkscrew&lt;/pre&gt;&lt;br /&gt;   5 - Create the following script with executable privs: (CAUTION, this will overwrite your ~/.ssh/config)&lt;br /&gt;       &lt;pre&gt;#!/bin/bash&lt;br /&gt;if [ "$1" == on ]; then&lt;br /&gt; echo "TURN IT ON"&lt;br /&gt; /path/to/android-sdk-linux_86/tools/adb forward tcp:8181 tcp:8181&lt;br /&gt; echo "Host *" &amp;gt; ~/.ssh/config&lt;br /&gt; echo " ProxyCommand corkscrew localhost 8181 %h %p" &amp;gt;&amp;gt; ~/.ssh/config&lt;br /&gt;elif [ "$1" == off ]; then&lt;br /&gt; echo "TURN IT OFF"&lt;br /&gt; /path/to/android-sdk-linux_86/tools/adb kill-server&lt;br /&gt; rm ~/.ssh/config&lt;br /&gt;else&lt;br /&gt; echo "So are you going to turn me 'on' or 'off'?"&lt;br /&gt;fi&lt;/pre&gt;&lt;br /&gt;   6 - Start the tether &lt;pre&gt;$ ./tether.sh on&lt;/pre&gt;&lt;br /&gt;   7 - In Firefox - Preferences &amp;gt; Advanced &amp;gt; Network &amp;gt; Connection Settings &amp;gt; Manual proxy&lt;br /&gt;           &amp;gt; HTTP Proxy = localhost&lt;br /&gt;           &amp;gt; Port = 8181&lt;br /&gt;           &amp;gt; Use this proxy server for all protocols = yes&lt;br /&gt;   7.1-I just use the FoxyProxy Basic add-on to manage all this for me&lt;/blockquote&gt;Don't expect to be able to watch Hulu or anything, but you should be able to check your email or connect via SSH with ease =)&lt;br /&gt;&lt;br /&gt;Please let me know if any part of this doesn't work for you or if you find a better way to do it.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/y56mBs2-Kt4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/8000030436957866848/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=8000030436957866848&amp;isPopup=true" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/8000030436957866848?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/8000030436957866848?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/y56mBs2-Kt4/ubuntu-laptop-tethered-to-droid-eris.html" title="Ubuntu Laptop Tethered to Droid Eris via Proxoid" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>8</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/ubuntu-laptop-tethered-to-droid-eris.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIFRng_eip7ImA9WxBTGE8.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-8678464377793391997</id><published>2009-12-14T12:12:00.000-08:00</published><updated>2009-12-14T12:28:37.642-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-14T12:28:37.642-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="bash scripting" /><category scheme="http://www.blogger.com/atom/ns#" term="cisco" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="ssh" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="networks" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Cisco Hardware Inventory Web App v0.1a</title><content type="html">If you're one of those people that manages a bigish Cisco network, you might also know that tracking inventory for those Cisco devices can be very painful.  Each router and switch has several different cards and ports installed, each with it's own serial number.  Multiply that by, say, 50 routers and your Excel spreadsheet is getting pretty big.&lt;br /&gt;&lt;br /&gt;Oops, now that SFP died and had to be RMAed, but you were too busy soothing an angry user that couldn't check email for 2 hours while you were troubleshooting and you forgot to update the entry on your spreadsheet so now you have the wrong serial number.&lt;br /&gt;&lt;br /&gt;GAH!&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Introducing the&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:130%;"  &gt;&lt;a href="http://code.google.com/p/cisco-hw-inventory/"&gt;Cisco Hardware Inventory Web App&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This little (11k) bit of code will collect inventory information from your Cisco routers and present it in a simple, but effective web page.  To get it working, you'll need a webserver (I use &lt;a href="http://www.apachefriends.org/en/xampp.html"&gt;XAMPP&lt;/a&gt; on a virtual install of &lt;a href="http://www.xubuntu.org/"&gt;Xubuntu&lt;/a&gt;) running PHP that has the &lt;span style="font-weight: bold;"&gt;expect&lt;/span&gt; package installed.&lt;br /&gt;&lt;br /&gt;The gory details on how to get it running are available on the project page, but feel free to contact me if you need help getting it set up on your network.&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/tiJWZA8FZ30" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/8678464377793391997/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=8678464377793391997&amp;isPopup=true" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/8678464377793391997?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/8678464377793391997?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/tiJWZA8FZ30/cisco-hardware-inventory-web-app-v01a.html" title="Cisco Hardware Inventory Web App v0.1a" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/cisco-hardware-inventory-web-app-v01a.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EEQXY4fSp7ImA9WxBTFUs.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-5647750362481257321</id><published>2009-12-11T12:00:00.000-08:00</published><updated>2009-12-11T12:00:00.835-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-11T12:00:00.835-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="slacker.com" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="ssh" /><category scheme="http://www.blogger.com/atom/ns#" term="phone" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><category scheme="http://www.blogger.com/atom/ns#" term="eris" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><category scheme="http://www.blogger.com/atom/ns#" term="how I roll" /><category scheme="http://www.blogger.com/atom/ns#" term="eeepc" /><title>Introducing the Eris</title><content type="html">&lt;blockquote style="font-style: italic;"&gt;"There are many like it, but this one is mine."&lt;/blockquote&gt;&lt;div style="text-align: right;"&gt;-The Rifleman's Creed&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;Yep, I got a Droid Eris.&lt;br /&gt;&lt;br /&gt;Actually, I got it about a week ago and I've been so busy figuring it out (and working) that I've been neglecting the blog.  Mea culpa.&lt;br /&gt;&lt;br /&gt;So what do I think of it so far?  It is awesome.  I had been using a BlackBerry Pearl for the last 2ish years so to upgrade to a large touch-screen with a Linux-based OS is a very good change!&lt;br /&gt;&lt;br /&gt;The screen is large, bright and clear.  It's very responsive to the touch input and the keyboard, even in portrait mode, is still very usable even with my big fingers (I'm 6'4" and have 'big' hands for my size).&lt;br /&gt;&lt;br /&gt;The only disappointment I've had so far with it is the Proxoid application doesn't work with my EeePC.  The instructions say to use the Android 1.5 SDK to complete the connection, but all I could find was the 2.0 SDK so I'm not sure I'm doing it right and I haven't put any serious effort into solving it just yet.&lt;br /&gt;&lt;br /&gt;While I'm on the topic of third-party apps, here's the list of apps I've installed so far (all free):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Listen (podcast app, just starting to figure it out)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Places Directory (Google's find local business app)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;My Tracks (for hiking/travelling)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Google Sky Map (to show how cool the positioning is)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Andoku (Sudoku)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;RemoteDroid (remotely control a PC's mouse &amp;amp; keyboard)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Layar (augmented reality - very cool)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Astro (file/task manager)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dolphin Browser (replacement web browser w/ touch gestures)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Mobiqpons (coupon app)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Android LightSaber (for battling my iPhone counterparts)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Proxoid (proxy app that is supposed to let me use my phone's data plan to surf w/ my laptop)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Qik (live video streaming from my phone to the web - also very cool!)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;TV.com (for when I'm bored of Sudoku)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ringdroid (haven't used it much, create custom ringtones)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ScanLife (for reading those cool square bar codes)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SlackerRadio (cuz slacker.com is awesome!)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;DigitalClock (turns the phone into a big digital clock)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Yelp (it's ... yelp)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Compass (for fun navigation)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;G-MoN (doing my part to map the WiFi world)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Finance (because I like to pretend I know what's going on in the financial world)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Network Widget (display's network info on the 'desktop')&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Google Voice (I don't even use the regular phone number any more)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Network Discovery (a port-scanner on my phone!)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LiveBible (not entirely happy with the navigation, but it's the best one I've found so far)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;NetCounter (for tracking my network usage)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ConnectBot (&lt;span style="font-weight: bold;"&gt;MUST HAVE APP&lt;/span&gt;!!! - lets you SSH to remote hosts &amp;amp; provides a console to your phone!)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;DynDNS (so I can track my phone via IP)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;VLC Remote (control a running VLC instance on your desktop)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;MyIP (displays my network info)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SilentMode OnOff (one touch silent mode)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Where's My Droid (send a text to have your phone start ringing even if it's on silent)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/2Y_mTPsbW6E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/5647750362481257321/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=5647750362481257321&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5647750362481257321?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5647750362481257321?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/2Y_mTPsbW6E/introducing-eris.html" title="Introducing the Eris" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/introducing-eris.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQEQXw7eyp7ImA9WxNaGUo.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-5955245143870205817</id><published>2009-12-04T17:25:00.000-08:00</published><updated>2009-12-04T17:25:00.203-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T17:25:00.203-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="greasemonkey" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><title>Tschuss, Expert's Exchange!</title><content type="html">I've had it with Expert's Exchange.  Almost every time I search Google for something technically oriented, I get results from Expert's Exchange that seem to be exactly what I'm looking for and without bothering to look at the site providing the answer, I eagerly follow the link only to find that my supposed solution is hiding behind a pay wall.&lt;br /&gt;&lt;br /&gt;SRSLY?! You want me to pay for this stuff?&lt;br /&gt;&lt;br /&gt;I know, I know - they've got to make a living too and all that so I can't be too hard on them.  But I have decided that I won't tease myself anymore with near solutions.  Instead I wrote this little script to simply block the display of links pointing to Expert's Exchange in Google search results.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;&lt;a href="http://userscripts.org/scripts/show/63479"&gt;No More Expert's Exchange&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;BAH!&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/ft_pnsUHB3c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/5955245143870205817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=5955245143870205817&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5955245143870205817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/5955245143870205817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/ft_pnsUHB3c/tschuss-experts-exchange.html" title="Tschuss, Expert's Exchange!" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/12/tschuss-experts-exchange.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8EQHcyeip7ImA9WxNbFko.&quot;"><id>tag:blogger.com,1999:blog-3466741925053685979.post-6485997634734497300</id><published>2009-11-19T17:00:00.000-08:00</published><updated>2009-11-19T17:00:01.992-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-19T17:00:01.992-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="updated" /><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint" /><category scheme="http://www.blogger.com/atom/ns#" term="formWorks" /><category scheme="http://www.blogger.com/atom/ns#" term="customization" /><title>formWorks 0.7a</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6IeZdz_xkNM/SwWHuzxsU_I/AAAAAAAAAXw/YgSJLSfcG90/s1600/formWorks-0.7a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://3.bp.blogspot.com/_6IeZdz_xkNM/SwWHuzxsU_I/AAAAAAAAAXw/YgSJLSfcG90/s400/formWorks-0.7a.png" alt="" id="BLOGGER_PHOTO_ID_5405876165970514930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A recent email exchange has led me to update the formWorks code and include a couple new functions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;insertHeader(n, header)&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;This feature will let you insert section headers by adding a single line to the proper section in runMods().  For example, the code below should create the section headers we're trying to set up for your page:&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div style="margin-left: 80px;"&gt;&lt;span style="font-family:courier new,monospace;"&gt;function runMods() {&lt;/span&gt; &lt;span style="font-family:courier new,monospace;"&gt; ...&lt;/span&gt;  &lt;span style="font-family:courier new,monospace;"&gt; } else if (location.href.match(/NewForm.&lt;wbr&gt;aspx/)) {&lt;/span&gt; &lt;span style="font-family:courier new,monospace;"&gt;&lt;br /&gt; ... twoCols() code here...&lt;br /&gt;&lt;br /&gt; &lt;b&gt;insertHeader(19, "Counties");&lt;/b&gt;&lt;/span&gt; &lt;span style="font-family:courier new,monospace;"&gt;  &lt;b&gt;insertHeader(21, "Provider Types");&lt;/b&gt;&lt;/span&gt;  &lt;span style="font-family:courier new,monospace;"&gt; }&lt;/span&gt; &lt;span style="font-family:courier new,monospace;"&gt;...&lt;/span&gt; &lt;span style="font-family:courier new,monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;fixWidth()&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Setting the variables at the top of this function to your desired length in pixel or percentage measurements will resize the elements of the form to your taste.  To execute this function, simply call the function from anywhere and it will update the CSS on the page.  Variables are:&lt;/li&gt;&lt;ol&gt;&lt;li  style="font-family:courier new,monospace;"&gt;formWidth - &lt;span style="font-family:arial,helvetica,sans-serif;"&gt;this will change the width of the form as a whole&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li  style="font-family:courier new,monospace;"&gt; labelWidth - &lt;span style="font-family:arial,helvetica,sans-serif;"&gt;this will change the width of the labels (list column titles) on the left of the form&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li  style="font-family:courier new,monospace;"&gt;contentWidth - &lt;span style="font-family:arial,helvetica,sans-serif;"&gt;this will change the width of the text and table cell on the right of the form&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li  style="font-family:courier new;"&gt;inputWidth - &lt;span style="font-family:arial;"&gt;this will change the width of the input objects on the form&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;/ul&gt;Also, I removed the "areYouAdmin()" function as it was causing more problems than it was solving.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-family: courier new; font-weight: bold;font-size:180%;" &gt;&lt;a href="http://code.google.com/p/formworks/"&gt;Download formWorks 0.7a&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/bandit36/moblog/~4/oL09REtvAUc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://moblog.bradleyit.com/feeds/6485997634734497300/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3466741925053685979&amp;postID=6485997634734497300&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6485997634734497300?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3466741925053685979/posts/default/6485997634734497300?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bandit36/moblog/~3/oL09REtvAUc/formworks-07a.html" title="formWorks 0.7a" /><author><name>Ben</name><uri>http://www.blogger.com/profile/03687609274394927057</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_6IeZdz_xkNM/SoM5eYC9U5I/AAAAAAAAAUQ/2GJ4Uve3OFo/S220/4321%5B1%5D.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_6IeZdz_xkNM/SwWHuzxsU_I/AAAAAAAAAXw/YgSJLSfcG90/s72-c/formWorks-0.7a.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://moblog.bradleyit.com/2009/11/formworks-07a.html</feedburner:origLink></entry></feed>
