<?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>EdwardH &#187; script</title>
	<atom:link href="http://edwardh.se/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwardh.se</link>
	<description>Reviews and such</description>
	<lastBuildDate>Tue, 19 Oct 2010 16:53:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flashback Ignore</title>
		<link>http://edwardh.se/2010/05/08/flashback-ignore/</link>
		<comments>http://edwardh.se/2010/05/08/flashback-ignore/#comments</comments>
		<pubDate>Sat, 08 May 2010 14:18:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://edwardh.se/?p=184</guid>
		<description><![CDATA[Flashback Ignore är ett Greasemonkey skript som används för att verkligen sätta folk på ignore. Alla deras inlägg, inlägg som citerar dem samt deras trådar försvinner. Ladda hem skriptet Skriptet finns att ladda hem från userscripts. Hur man använder skriptet Installera Besök Flashback. Öppna about:config, sök efter flashback_ignore och där bör du se några inställningar. [...]]]></description>
			<content:encoded><![CDATA[<p>Flashback Ignore är ett Greasemonkey skript som används för att <strong>verkligen</strong> sätta folk på ignore.</p>
<p>Alla deras inlägg, inlägg som citerar dem samt deras trådar försvinner.</p>
<h2>Ladda hem skriptet</h2>
<p><a href="http://userscripts.org/scripts/show/46452">Skriptet finns att ladda hem från userscripts</a>.</p>
<h2>Hur man använder skriptet</h2>
<ol>
<li>Installera</li>
<li>Besök Flashback.</li>
<li>Öppna about:config, sök efter <em>flashback_ignore</em> och där bör du se några inställningar.</li>
</ol>
<p><a rel="attachment wp-att-187" href="http://edwardh.se/2010/05/08/flashback-ignore/about_config/"><img class="aligncenter size-full wp-image-187" title="about_config" src="http://edwardh.se/wp-content/uploads/2010/05/about_config.jpg" alt="" width="600" height="79" /></a></p>
<p>Sista raden, <em>users</em>, är det viktiga. Skriv in alla användare du vill ignorera där med komma emellen. Skriv <strong>exakt</strong> vad de heter.</p>
<h2>Min användarlista</h2>
<p>Vill du veta vilka jag har satt på ignore? Visst.</p>
<p>wildhorses,leosundberg,Flytande_argot,Encia,Geccko,Metafor,2HeadsOnEagle,Skattesmitarn,Ominus,Albanian Soul,Jok3r,HowlinWolf,Walker,Bengrot,Henderson,Orzion,skjutsnuten,Tretjak,aspera,nyman,nedboy,SFC1977,resonerande,Mariesthlm,JackBlack,Powergirl,zobban,achillea,Herr Lindholm,Red Machine,Ruskigbuss,b0gfetto,Ignatius I,Ålen,Kadek,gulasnubben,Voltec,unsung,bombacci,saprofyt.,RadicalKick,micro113,IvanLendl,109740,Ruskibuss,G.W,Mihailovic,Darkstar,Hellstorm,Telefonsamtal,Mansig,Nostradamus72,Ankdammsman,Aristotélēs,moderatswing,Babianen,BrB_DnD,micaele,Kingen_king,Kaiser Chief,TKD_1337,Dogdylan,Pinkskin</p>
<p>De e najs.</p>
]]></content:encoded>
			<wfw:commentRss>http://edwardh.se/2010/05/08/flashback-ignore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress upgrading / installation problems</title>
		<link>http://edwardh.se/2010/02/12/wordpress-upgrading-installation-problems/</link>
		<comments>http://edwardh.se/2010/02/12/wordpress-upgrading-installation-problems/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 01:18:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://edwardh.se/?p=78</guid>
		<description><![CDATA[Unable to install new or upgrade themes and plugins? Even though your permissions are ok? It's a problem that's got to do with (1) your web host and their incorrectly configured servers and (2) Wordpress not being flexible enough to work around those bad server configs. Here's a patch that can help.]]></description>
			<content:encoded><![CDATA[<p>Sometimes, on some web hosts, after manually installing WordPress you can&#8217;t install new plugins, upgrade the ones you have installed or install new themes. Instead of installing the new plugin it will ask you for your FTP settings.</p>
<p>Searching for help will only give you a bunch of links that tell you to check your permissions but if your <em>/wp-content</em> already has 777 then why is it still broken?<span id="more-78"></span></p>
<h2>getmyuid() has been disabled for security reasons</h2>
<p>The answer is, most probably, the above heading as an invisible error. Your webhost has a misconfigured server or something &#8211; I&#8217;m not quite sure <strong>why</strong> this happens, the thing is it does.</p>
<p>This function, getmyuid(), prevents PHP and therefore WordPress from finding out which user ID is running WordPress. So WordPress assumes direct file system access is broken and therefore goes to FTP mode. Which is irritating.</p>
<p>I&#8217;ve <a href="http://core.trac.wordpress.org/ticket/12201">sent in a workaround getmyuid() patch</a> to the WordPress guys. We&#8217;ll see if they want to include it anytime.</p>
<h2>Download the patch here</h2>
<p>The file in question is <em>/wp-admin/includes</em>. Help yourselves to the patch or the complete file. My WordPress version is 2.9.1.</p>
<p><a href="http://edwardh.se/wp-content/uploads/2010/02/file.php_.diff_.zip">file.php.diff.zip</a></p>
<p><a href="http://edwardh.se/wp-content/uploads/2010/02/file.php_.zip">file.php.zip</a></p>
<h2>Anything else I should know?</h2>
<p>Just make sure you completely reset the ownership of all your <em>wp-admin</em> files before patching. Just in case that helps (although I&#8217;m sure you&#8217;ve probably tried everything before finding this page).</p>
]]></content:encoded>
			<wfw:commentRss>http://edwardh.se/2010/02/12/wordpress-upgrading-installation-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpAutoIndex</title>
		<link>http://edwardh.se/2010/02/06/phpautoindex/</link>
		<comments>http://edwardh.se/2010/02/06/phpautoindex/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 23:47:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://edwardh.se/?p=51</guid>
		<description><![CDATA[phpAutoIndex is a PHP5-script that was written to quickly and easily share files and texts amongst friends. It is similar to Apache&#8217;s autoindex module in that it lists the files of a directory, but it also allows user to upload files and texts. Features There is a basic amount of security involved, restricting access to [...]]]></description>
			<content:encoded><![CDATA[<p>phpAutoIndex is a PHP5-script that was written to quickly and easily  share files and texts amongst friends. It is similar to Apache&#8217;s  autoindex module in that it lists the files of a directory, but it also  allows user to upload files and texts.<span id="more-51"></span></p>
<h2>Features</h2>
<ul>
<li>There is a basic amount of <strong>security</strong> involved,  restricting access to the shared directory. The files shared should be  considered soon-to-be trash, just to be on the safe side.</li>
<li>The <strong>theme</strong> is completely configurable.</li>
<li><strong>Uploaded</strong> files can be treated as normal files, or  automatically <strong>unzipped</strong> depending on the theme.</li>
</ul>
<h2>Screenshots</h2>
<p><a href="../wp-content/uploads/2010/02/phpautoindex-screenshot-normal.jpg"><img title="phpautoindex-screenshot-normal" src="../wp-content/uploads/2010/02/phpautoindex-screenshot-normal.jpg" alt="" width="500" height="335" /></a><br />
Above is how Apache normally autoindexes directories&#8230;</p>
<p>&#8230; and this is what the  default theme looks like for phpAutoindex. A selected file and the top  of the upload &amp; quickpaste forms are visible.</p>
<p><a href="http://edwardh.se/wp-content/uploads/2010/02/phpautoindex-screenshot.jpg"><img class="alignnone size-full wp-image-54" title="phpautoindex-screenshot" src="http://edwardh.se/wp-content/uploads/2010/02/phpautoindex-screenshot.jpg" alt="" width="600" height="373" /></a></p>
<h2>Requirements</h2>
<ul>
<li>PHP5</li>
</ul>
<h2>Download</h2>
<p><a href="http://edwardh.se/wp-content/uploads/2010/02/phpAutoIndex-1.0.zip">phpAutoIndex-1.0.zip</a></p>
<table border="0">
<caption>Changelog</caption>
<thead>
<tr>
<td>Date</td>
<td>Version</td>
<td>Changes</td>
</tr>
</thead>
<tbody>
<tr>
<td>2009-05-04</td>
<td>1.0</td>
<td>First version</td>
</tr>
</tbody>
</table>
<h2>Installation</h2>
<ul>
<li>Unzip to a directory in your htdocs.</li>
<li>Have a quick look at the <strong>index.php</strong> file.</li>
</ul>
<h2>License</h2>
<p>phpAutoIndex is GPLv3.</p>
<h2>Contact</h2>
<p>If something doesn&#8217;t work or you need help, try <a href="mailto:edward@edwardh.se">emailing me</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://edwardh.se/2010/02/06/phpautoindex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switchscreen</title>
		<link>http://edwardh.se/2010/02/06/switchscreen/</link>
		<comments>http://edwardh.se/2010/02/06/switchscreen/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 23:43:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://edwardh.se/?p=45</guid>
		<description><![CDATA[Switchscreen is a utility to switch monitors. As of v0.1.1 it doesn&#8217;t really work properly because of my sloppy window focus setting, but I&#8217;ve added some modifications I found in another modified version. Now you can switch between several monitors and yet keep the mouse and keyboard focus working. Background Most window managers don&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Switchscreen is a   utility to switch monitors. As of v0.1.1 it doesn&#8217;t really work   properly because of my sloppy window focus setting, but I&#8217;ve added some   modifications I found in another   modified version. Now you can switch between several monitors and   yet keep the mouse and keyboard focus working.<span id="more-45"></span></p>
<h2>Background</h2>
<p>Most window managers don&#8217;t have proper multihead window handling.  WindowMaker does, with a hotkey and everything, but it&#8217;s from fucking  2005. When I actually switched to Linux in ~2003 WindowMaker was still  modern&#8230;</p>
<p>I&#8217;ve recently switched to XFCE and since it doesn&#8217;t care about  multihead setups (I have three monitors) I&#8217;ve had to come up with a  solution.</p>
<h2>The switchscreen utility</h2>
<p><a href="http://users.tkk.fi/spniskan/switchscreen/">Switchscreen is a  utility to switch monitors</a>. As of v0.1.1 it doesn&#8217;t really work  properly because of my sloppy window focus setting, but I&#8217;ve added some  modifications I found in <a href="http://unlogical.net/files/scripts/switchscreen-0.4.tar.gz">another  modified version</a>. Now you can switch between several monitors and  yet keep the mouse and keyboard focus working.</p>
<h2>My modified version of switchscreen</h2>
<p><a href="http://edwardh.se/wp-content/uploads/2010/02/switchscreen-0.1.2.tar.gz">Download switchscreen-0.1.2.tar</a></p>
<p>Basically, I&#8217;ve added some options in the <strong>toggleScreen.sh</strong> script and a utility called <strong>fakemousemove</strong>.</p>
<h3>toggleScreen.sh</h3>
<pre>#!/bin/bash

# Start of user settings.
# -----------------------

HIDECURSOR=1	# 1 to hide it. See below.

# Where to move the cursors for the displays that you're not using.
# Move the cursor wherever you want.
# Values are 0-based, therefore the maximum values are max-1.
# For example, the first one is for a 30" monitor that can do 2560x1600, then the max becomes 2560-1,1600-1
hideCursor=("2559,1599" "1919,1199" "1279,1023")

# In order for XFCE (among others) to properly grab focus using sloppy mouse focus, the mouse has to be "moved".
# The following two lines set the mouse to x0, y0 - which is where I have my panel.
# Then the mouse is then moved back to where it was: the window itself. Xfce sees this "movement" and the window is raised and what not.
SLOPPY_FOCUS_X=0	# Set to -1 for no sloppy focus fixing.
SLOPPY_FOCUS_Y=0

# Where did you put switchscreen &amp; co?
DIRECTORY=/home/edward/scripts/switchscreen		### CHANGEME!!! ###

# End of user settings.
# ---------------------

STOREFILE=${DIRECTORY}/.toogleScreen
CMD_SWITCHSCREEN=${DIRECTORY}/switchscreen
CMD_FAKEMOUSEMOVE=${DIRECTORY}/fakemousemove

CURRENT="`$CMD_SWITCHSCREEN -P`"
CURSCR=`echo "$CURRENT" | gawk '{ print $2 }'`
CURPOS=`echo "$CURRENT" | gawk '{ print $4 }'`

echo $CURPOS &gt; $STOREFILE.$CURSCR

# Calculate new monitor.

## CHANGEME!!! ##

# If you have two monitors, remove the '2' part (monitorCount+1).
# If you want some fancy schmany 0 -&gt; 2 -&gt; 1, instead of 0 -&gt; 1 -&gt; 2, change this.
case "$CURSCR" in
'0')
    NEWSCR=1
;;
'1')
    NEWSCR=2
;;
'2')
    NEWSCR=0
;;
esac

NEWPOS="`cat $STOREFILE.$NEWSCR 2&gt;/dev/null`"
if [ "$NEWPOS" ]; then
    POSOPT="-c $NEWPOS"
else
    POSOPT=""
fi

if [ "$HIDECURSOR" = "1" ]; then
    $CMD_SWITCHSCREEN -c ${hideCursor[$CURSCR]}		# Hide the cursor for this screen
fi

$CMD_SWITCHSCREEN -q $POSOPT $NEWSCR			# Go to the new screen.

if [ "$SLOPPY_FOCUS_X" != "-1" ]; then
    $CMD_FAKEMOUSEMOVE -c $SLOPPY_FOCUS_X,$SLOPPY_FOCUS_Y $NEWSCR	# First, move the mouse to where the panel is (ie: out of the window).
    $CMD_FAKEMOUSEMOVE $POSOPT $NEWSCR					# And now move it back in. Sloppy focus will now have focused on the window again.
fi
</pre>
<h3>Skip unimportant screens</h3>
<p>Personally, I&#8217;ve modified the case to simplify irc:ing. Screen 0 is  my main monitor, screen 1 is a misc monitor and screen 2 is  irc/centerim. Since I don&#8217;t want to have to page past screen 1 when I  want to quickly reply to something on IRC the script now checks when I  last switched monitors.</p>
<p>If I switched a while ago (more than 1 second) then I&#8217;m probably just  going to reply to something.</p>
<p>If I switched recently then I actually want to go to screen 1.</p>
<pre>'0')
    LASTSTORE=$STOREFILE.2
    TIME_LAST=`date -r $LASTSTORE +%s`
    let TIME_SINCE_LAST=`date +%s`-$TIME_LAST

    if [ "$TIME_SINCE_LAST" -gt "1" ]; then
	NEWSCR=2
    else
	NEWSCR=1
    fi
;;</pre>
<h2>How to use it</h2>
<ol>
<li>Unzip</li>
<li>Look in <strong>toggleScreen.sh</strong> and look for the text  &#8220;CHANGEME&#8221; (there are at least two). You might want to change the  hideCursor() array.</li>
<li>Make a keyboard shortcut in XFCE to the script. I&#8217;ve used <strong>ctrl-tab</strong>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://edwardh.se/2010/02/06/switchscreen/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

