<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Do Know Evil - A Blog by Tyler Mulligan &#187; Uncategorized</title> <atom:link href="http://www.doknowevil.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" /><link>http://www.doknowevil.net</link> <description>Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like</description> <lastBuildDate>Sat, 16 Jul 2011 01:25:35 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.5</generator> <item><title>Creating Named Widgets in WordPress Made Simple</title><link>http://www.doknowevil.net/2010/05/16/creating-named-widgets-in-wordpress-made-simple/</link> <comments>http://www.doknowevil.net/2010/05/16/creating-named-widgets-in-wordpress-made-simple/#comments</comments> <pubDate>Sun, 16 May 2010 23:22:03 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=620</guid> <description><![CDATA[Creating your own widgets in WordPress might seem like a complicated or confusing task but the truth is, it&#8217;s easier than you think! In your the root of your theme directory (ex: wp-content/themes/default), you&#8217;ll find a file called &#8220;functions.php&#8221;, if you do not, create it. Inside add: if ( function_exists(&#039;register_sidebar&#039;) ) { register_sidebar(array(&#34;id&#34; =&#62; &#34;facts_and_stats&#34;,]]></description> <content:encoded><![CDATA[<p>Creating your own widgets in <a href="http://www.wordpress.org">WordPress</a> might seem like a complicated or confusing task but the truth is, it&#8217;s easier than you think!</p><p>In your the root of your theme directory (ex: wp-content/themes/default), you&#8217;ll find a file called &#8220;functions.php&#8221;, if you do not, create it.</p><p>Inside add:</p><pre class="brush:php">
if ( function_exists(&#039;register_sidebar&#039;) ) {
   register_sidebar(array(&quot;id&quot; =&gt; &quot;facts_and_stats&quot;,
			&quot;name&quot; =&gt;&quot;Facts and Stats&quot;
   ));
}</pre><p>(all attributes can be found here: <a href="http://codex.wordpress.org/Function_Reference/register_sidebar" target="_balnk">http://codex.wordpress.org/Function_Reference/register_sidebar</a>)</p><p>In the backend, under &#8220;appearance > widgets&#8221;, you&#8217;ll find all available widgets and all available sidebars.  You can drag a widget into the sidebar and customize it.</p><p>Then in a template file in your theme, say your &#8220;index.php&#8221; file, you can call the content of this widget with the following block of code:</p><pre class="brush:php">&lt; ?php if ( function_exists(&#039;dynamic_sidebar&#039;) &amp;&amp; dynamic_sidebar(&quot;facts_and_stats&quot;) ) { } ?&gt;</pre><p>Widgets are wrapped in &lt;li&gt;&lt;/li&gt; by default, you can custom a group of them with a trick such as the following, where I remove all wrappers for multiple widgets by creating an array setting the before_ and afters_&#8217;s to nothing and merge it with the id and name info in another array I create inline.</p><pre class="brush:php">$widget_args=array(
	&#039;before_widget&#039; =&gt; &#039;&#039;,
	&#039;after_widget&#039; =&gt; &#039;&#039;,
	&#039;before_title&#039; =&gt; &#039;&#039;,
	&#039;after_title&#039; =&gt; &#039;&#039;,
);

if ( function_exists(&#039;register_sidebar&#039;) ) {
   register_sidebar(array_merge($widget_args,array(&quot;id&quot; =&gt; &quot;facts_and_stats&quot;, &quot;name&quot; =&gt;&quot;Facts and Stats&quot;)));
   register_sidebar(array_merge($widget_args,array(&quot;id&quot; =&gt; &quot;report_card&quot;, &quot;name&quot; =&gt;&quot;Report Card&quot;)));
}</pre><p>Another trick I I like to do is add a quick link on the frontend for to the edit page if the user is logged in an has rights to edit widgets:</p><pre class="brush:php">&lt;?php if (current_user_can(&#039;manage_options&#039;)) { echo &#039;&lt;a href=&quot;&#039;.get_bloginfo(&#039;url&#039;).&#039;/wp-admin/widgets.php&quot; title=&quot;edit this widget&quot;&gt;edit this widget&lt;/a&gt;&#039;; } ?&gt;</pre>]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/05/16/creating-named-widgets-in-wordpress-made-simple/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>[SOLVED] konversation has no window decorations in GNOME and forces fullscreen</title><link>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/</link> <comments>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/#comments</comments> <pubDate>Mon, 10 May 2010 04:29:40 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Computers]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[konversation]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[irc chat]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=585</guid> <description><![CDATA[This was a very annoying bug for me to deal with and it almost caused me to switch to kde 4 earlier than planned. Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve. To fix this, go into CompizConfig Settings Manager]]></description> <content:encoded><![CDATA[<p>This was a very annoying bug for me to deal with and it <a href="http://www.doknowevil.net/2010/02/23/in-search-of-better-window-management">almost caused me to switch to kde 4 earlier than planned</a>.  Luckily I was able to pull up a fix which is simple to replicate but was a pain in the arse to solve.</p><p>To fix this, go into CompizConfig Settings Manager >> Workarounds >> uncheck &#8220;Legacy Fullscreen Support&#8221; as the red circle in the screenshot below indicates.</p><p><a href="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/05/to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this.png" alt="" title="to-get-konversation-to-not-freak-out-in-gnome-with-compiz-uncheck-this" width="1015" height="625" class="alignnone size-full wp-image-586" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/05/09/solved-konversation-has-no-window-decorations-in-gnome-and-forces-fullscreen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Random cow(ish) animals preaching quotes on Ubuntu 9.10</title><link>http://www.doknowevil.net/2010/02/03/random-cowish-animals-preaching-quotes-on-ubuntu-910/</link> <comments>http://www.doknowevil.net/2010/02/03/random-cowish-animals-preaching-quotes-on-ubuntu-910/#comments</comments> <pubDate>Thu, 04 Feb 2010 01:02:01 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Bash]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[cowsay]]></category> <category><![CDATA[fortune]]></category> <category><![CDATA[ssh]]></category><guid isPermaLink="false">http://www.doknowevil.net/?p=521</guid> <description><![CDATA[Looking for something interesting when I login to one of my servers, I decided to whip up the following script I appended to my ~/.bashrc file. # fortune and cowsay are needed for the snippet to work, I had to install these first sudo apt-get install fortune cowsay COWDIR=/usr/share/cowsay/cows/; COWNUM=$(($RANDOM%$(ls $COWDIR &#124; wc -l))); COWFILE=$(ls]]></description> <content:encoded><![CDATA[<p>Looking for something interesting when I login to one of my servers, I decided to whip up the following script I appended to my ~/.bashrc file.</p><pre class="brush:bash"># fortune and cowsay are needed for the snippet to work, I had to install these first
sudo apt-get install fortune cowsay</pre><pre class="brush:bash">COWDIR=/usr/share/cowsay/cows/; COWNUM=$(($RANDOM%$(ls $COWDIR | wc -l))); COWFILE=$(ls $COWDIR | sed -n &#039;&#039;$COWNUM&#039;p&#039;); fortune | cowsay -f $COWFILE</pre><p>UPDATE:</p><p>Suggested by MrBougo, a shorter but perhaps more process intensive method:</p><pre class="brush:bash">fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf | head -n1)</pre><div id="attachment_523" class="wp-caption alignnone" style="width: 1342px"><a href="http://www.doknowevil.net/wp-content/uploads/2010/02/screenshot1.png"><img src="http://www.doknowevil.net/wp-content/uploads/2010/02/screenshot1.png" alt="random cowsay fortune" title="random cowsay fortune" width="1332" height="850" class="size-full wp-image-523" /></a><p class="wp-caption-text">random cowsay fortune</p></div><p>Breaking down the script, the first 3 parts create variables and the last command executes the cowsay and quote.</p><pre class="brush:bash">
# defines the directory of the cow files
COWDIR=/usr/share/cowsay/cows/;

# Get a random number limited to the number of files in the directory, making clever use of % (mod) and adding 1 to make sure it doesn&#039;t return 0
COWNUM=$(($RANDOM%$(ls $COWDIR | wc -l))+1);

# list the contents of the cow dir again, pipe to sed and use the number as a random line to get the name of a file
COWFILE=$(ls $COWDIR | sed -n &#039;&#039;$COWNUM&#039;p&#039;);

# use fortune to get a quote, pipe to cowsay and use the file as defined above
fortune | cowsay -f $COWFILE;</pre>]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2010/02/03/random-cowish-animals-preaching-quotes-on-ubuntu-910/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Sup Party People?  Ya like Nexuiz and Geany?  Ballin&#039; like a ninja?</title><link>http://www.doknowevil.net/2008/11/16/sup-party-people-ya-like-nexuiz-and-geany-ballin-like-a-ninja/</link> <comments>http://www.doknowevil.net/2008/11/16/sup-party-people-ya-like-nexuiz-and-geany-ballin-like-a-ninja/#comments</comments> <pubDate>Sun, 16 Nov 2008 16:03:54 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[design]]></category> <category><![CDATA[life]]></category> <category><![CDATA[Nexuiz]]></category><guid isPermaLink="false">http://www.doknowevil.net/2008/11/16/sup-party-people-ya-like-nexuiz-and-geany-ballin-like-a-ninja/</guid> <description><![CDATA[I&#8217;ve been quite involved in the open-source project Nexuiz recently. Most of my free time between work and school is focused on it. School&#8217;s been an interesting challenge. I&#8217;m taking two Psychology courses and a Physics class. They are both helping me get a deeper understanding of the game, the code and the community I]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been quite involved in the open-source project <a href="http://www.nexuiz.com" title="A free open-source first person shooter for Windows, Linux and OSX" target="_blank">Nexuiz</a> recently.  Most of my free time between work and school is focused on it.  School&#8217;s been an interesting challenge.  I&#8217;m taking two Psychology courses and a Physics class.  They are both helping me get a deeper understanding of the game, the code and <a href="http://www.nexuizninjaz.com" title="Nexuiz Ninjaz - Practicing the ninja arts of Nexuiz" target="_blank">the community I run</a> based around it.  Nexuiz is an appealing game to people of all skills, the code base has gotten pretty strong and the effects are looking really nice.  The recent addition of client-side quakec has spawned new features that simply were not possible prior to this change.</p><p>Like this new scoreboard<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=2m162h8o0acd5cetuqr5.jpg"><img src="http://pics.nexuizninjaz.com/files/2m162h8o0acd5cetuqr5_thumb.jpg" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>developed by blub, roughly based on a mockup I created<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=1qlsw436sairgx0unmef.png"><img src="http://pics.nexuizninjaz.com/files/1qlsw436sairgx0unmef_thumb.png" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>whose later HUD is being attempted by victim<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=pmu9m35ax5vafzjmc1o5.png"><img src="http://pics.nexuizninjaz.com/files/pmu9m35ax5vafzjmc1o5_thumb.png" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>I also began to theorize object relationships to be future projects I&#8217;d like to develop<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=5vrtsiflgilpwi7qomns.png"><img src="http://pics.nexuizninjaz.com/files/5vrtsiflgilpwi7qomns_thumb.png" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>I started working on my mapping skills (made this baby for my Technical Theatre class)<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=dric1cqexx1qeevkrx2r.png"><img src="http://pics.nexuizninjaz.com/files/dric1cqexx1qeevkrx2r_thumb.png" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>later releasing a classic Halo favorite remade and remixed collaborating with Michael &#8220;Tenshihan&#8221; Quinn and Florian &#8220;tapas&#8221; Schmidt<br /> <a href="http://www.nexuizninjaz.com/forum/showthread.php?tid=553"><img src="http://maps.nexuizninjaz.com/images/whizard_v1r4_beta.jpg" border="0" alt="nexuizninjaz.com" /></a></p><p>started building some tools to run Nexuiz game servers<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=kj4gj894w7u11lyru2z6.jpg"><img src="http://pics.nexuizninjaz.com/files/kj4gj894w7u11lyru2z6_thumb.jpg" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>which are being provided by<br /> <a href="http://www.echoservers.com"><img src="http://www.nexuizninjaz.com/echo_servers_ninjaz.jpg" border="0" alt="pics.nexuizninjaz.com" /></a><br /> whom have been very kind in helping us setup, upgrade and change locations.  Big thanks to <a href="http://mkzelda.net" title="mkzelda of the Nexuiz Ninjaz">mkzelda</a> who&#8217;s helped keep us on our feet in this respect.</p><p>gave a little love to the <a href="http://www.planetnexuiz.com/tourney/" title="Nexuiz - Tourney">Nexuiz Tournament</a> website, further extending that theme back into the game:<br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=zfz1ijl15gu50b1yuj37.jpg"><img src="http://pics.nexuizninjaz.com/files/zfz1ijl15gu50b1yuj37_thumb.jpg" border="0" alt="pics.nexuizninjaz.com" /></a><br /> <a href="http://pics.nexuizninjaz.com/viewer.php?file=t15nz0opjbh5q1bfiu7o.jpg"><img src="http://pics.nexuizninjaz.com/files/t15nz0opjbh5q1bfiu7o_thumb.jpg" border="0" alt="pics.nexuizninjaz.com" /></a></p><p>and now the ninjaz at our 1 year anniversary<br /> <a href="http://www.nexuizninjaz.com/forum/showthread.php?tid=585" title="Nexuiz Ninjaz 1 year anniversary"><img src="http://www.nexuizninjaz.com/graphics/kojn_dragon_1.png" border="0" alt="nexuizninjaz.com" /></a><br /> that we are celebrating with a mapping contest.</p><p>I&#8217;m still using and loving<br /> <a href="http://www.ubuntu.com/" title="Ubuntu Linux" target="_blank"><img src="http://www.ubuntu.com/themes/ubuntu07/images/ubuntulogo.png" alt="ubuntu.com"></a></p><p>with a text editor I&#8217;m loving more each day, geany<br /> <a href="http://www.ubuntu.com/" title="Geany -  Great Linux Text Editor" target="_blank"><img src="http://geany.org/images/geany.png" alt="geany"></a></p><p>I hope to have more tips and tricks for you all soon.  I&#8217;ve been learning a lot on linux recently.  I&#8217;ve been pretty focused as you can see but I&#8217;d be more than happy to answer any questions you may have.  Feel free to contact me.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2008/11/16/sup-party-people-ya-like-nexuiz-and-geany-ballin-like-a-ninja/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>I&#039;ve Got Good Life Hacks On The Way</title><link>http://www.doknowevil.net/2007/07/16/ive-got-good-life-hacks-on-the-way/</link> <comments>http://www.doknowevil.net/2007/07/16/ive-got-good-life-hacks-on-the-way/#comments</comments> <pubDate>Tue, 17 Jul 2007 04:34:33 +0000</pubDate> <dc:creator>Tyler Mulligan</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://www.doknowevil.net/2007/07/16/ive-got-good-life-hacks-on-the-way/</guid> <description><![CDATA[I&#8217;ve been swapped with work and projects recently but I wanted to let you all know I&#8217;ll be back with some good life hacks&#8230; and maybe a few computer tricks. Stay tuned.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been swapped with work and projects recently but I wanted to let you all know I&#8217;ll be back with some good life hacks&#8230; and maybe a few computer tricks.  Stay tuned.</p> ]]></content:encoded> <wfw:commentRss>http://www.doknowevil.net/2007/07/16/ive-got-good-life-hacks-on-the-way/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Object Caching 547/600 objects using disk

Served from: www.doknowevil.net @ 2012-02-07 08:53:19 -->
