<?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>Kagee&#039;s random rantings</title>
	<atom:link href="http://blog.hild1.no/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hild1.no</link>
	<description>Just another Moshwire.com site</description>
	<lastBuildDate>Fri, 30 Mar 2012 18:38:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Git: oldcommit-split-preserve-timestamp</title>
		<link>http://blog.hild1.no/2011/06/15/git-oldcommit-split-preserve-timestamp/</link>
		<comments>http://blog.hild1.no/2011/06/15/git-oldcommit-split-preserve-timestamp/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 05:30:45 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=382</guid>
		<description><![CDATA[Splitting a old git commit while preserving commit timestamps Referenses http://book.git-scm.com/4_interactive_rebasing.html http://manpages.ubuntu.com/manpages/maverick/man1/git-commit.1.html#contenttoc3]]></description>
			<content:encoded><![CDATA[<p>Splitting a old git commit while preserving commit timestamps</p>
<pre class="brush: bash; title: ; notranslate">
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase -i c2180
Stopped at be7755e... Comments
You can amend the commit now, with

	git commit --amend

Once you are satisfied with your changes, run

	git rebase --continue

hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git reset HEAD^
Unstaged changes after reset:
M	parser/createSG/src/no/hig/rag/parser/BuildInitialSceneGraph.java
M	parser/createSG/src/no/hig/rag/parser/ColladaParse.java
M	parser/createSG/src/no/hig/rag/parser/GameObject.java
M	parser/createSG/src/no/hig/rag/parser/Main.java
M	parser/createSG/src/no/hig/rag/parser/MtlParse.java
M	parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -c be7755e -- parser/createSG/src/no/hig/rag/parser/MtlParse.java parser/createSG/src/no/hig/rag/parser/ObjParse.java
[detached HEAD 7b4ef13] Remove unused classes from createSG
 2 files changed, 0 insertions(+), 382 deletions(-)
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/MtlParse.java
 delete mode 100644 parser/createSG/src/no/hig/rag/parser/ObjParse.java
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git commit -ac be7755e
[detached HEAD 1a6d313] Add javadoc comments and cleanup sourcecode
 4 files changed, 37 insertions(+), 48 deletions(-)
hildenae@ick:~/tmp/wwsvntogit/WizardWars$ git rebase --continue
Successfully rebased and updated refs/heads/master.
</pre>
<h3>Referenses</h3>
<ul>
<li>http://book.git-scm.com/4_interactive_rebasing.html</li>
<li>http://manpages.ubuntu.com/manpages/maverick/man1/git-commit.1.html#contenttoc3</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2011/06/15/git-oldcommit-split-preserve-timestamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trekke ut deler av et git-repository, og samtidig ta vare på historie</title>
		<link>http://blog.hild1.no/2011/04/15/trekke-ut-deler-av-et-git-repository-og-samtidig-ta-vare-pa-historie/</link>
		<comments>http://blog.hild1.no/2011/04/15/trekke-ut-deler-av-et-git-repository-og-samtidig-ta-vare-pa-historie/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 17:45:12 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[norwegian]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=340</guid>
		<description><![CDATA[Clone Do some magick Change origin Push]]></description>
			<content:encoded><![CDATA[<p><strong>Clone</strong></p>
<pre class="brush: bash; title: ; notranslate">
git clone git@github.com:Kagee/fixmystreet.git
Initialized empty Git repository in /home/hildenae/tmp/fixmystreet/.git/
remote: Counting objects: 10461, done.
remote: Compressing objects: 100% (3306/3306), done.
remote: Total 10461 (delta 6802), reused 10276 (delta 6713)
Receiving objects: 100% (10461/10461), 10.10 MiB | 497 KiB/s, done.
Resolving deltas: 100% (6802/6802), done.

cd fixmystreet/

ls
android  bin  commonlib  conf  db  iphone  LICENSE.txt  locale  notes  perllib  README.pod  t  templates  web  web-admin

ls android
Fix My Street  README.txt  Screenshots  TODO.txt
</pre>
<p><strong>Do some magick</strong></p>
<pre class="brush: bash; title: ; notranslate">
git filter-branch --subdirectory-filter android -- --all
Rewrite 33db13154330e9e7a33c0fb5c356eccb25a6edda (36/36)
Ref 'refs/heads/master' was rewritten
Ref 'refs/remotes/origin/master' was rewritten
Ref 'refs/remotes/origin/cities_release_1' was rewritten
WARNING: Ref 'refs/remotes/origin/master' is unchanged
Ref 'refs/remotes/origin/migrate_from_osgb36_to_wgs84' was rewritten
Ref 'refs/remotes/origin/migrate_to_catalyst' was rewritten
Ref 'refs/remotes/origin/reportemptyhomes' was rewritten

ls
Fix My Street  README.txt  Screenshots  TODO.txt
</pre>
<p><strong>Change origin</strong></p>
<pre class="brush: bash; title: ; notranslate">
git remote -v

origin	git@github.com:Kagee/fixmystreet.git (fetch)
origin	git@github.com:Kagee/fixmystreet.git (push)

git remote set-url origin git@github.com:Kagee/fiksgatami.git git@github.com:Kagee/fixmystreet.git

git remote -v

origin	git@github.com:Kagee/fiksgatami.git (fetch)
origin	git@github.com:Kagee/fiksgatami.git (push)
</pre>
<p><strong>Push</strong></p>
<pre class="brush: bash; title: ; notranslate">
hildenae@hildenae-laptop:~/tmp/fixmystreet$ git push origin master
Counting objects: 464, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (243/243), done.
Writing objects: 100% (464/464), 1.44 MiB, done.
Total 464 (delta 159), reused 428 (delta 158)
To git@github.com:Kagee/fiksgatami.git
 * [new branch]      master -&gt; master
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2011/04/15/trekke-ut-deler-av-et-git-repository-og-samtidig-ta-vare-pa-historie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Food from heaven</title>
		<link>http://blog.hild1.no/2011/02/16/food-from-heaven/</link>
		<comments>http://blog.hild1.no/2011/02/16/food-from-heaven/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 11:30:26 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[photoblogging food]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/2011/02/food-from-heaven/</guid>
		<description><![CDATA[Potato salad, roast beef, fried onions and pickles]]></description>
			<content:encoded><![CDATA[<p>Potato salad, roast beef, fried onions and pickles</p>
<p><a href="http://blog.hild1.no/files/2011/02/20110216_0011.jpg"><img class="alignnone size-medium wp-image-332" src="http://blog.hild1.no/files/2011/02/20110216_0011-300x168.jpg" alt="" width="300" height="168" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2011/02/16/food-from-heaven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling VNC and disabling desktop effects from the command line</title>
		<link>http://blog.hild1.no/2011/02/05/enabling-vnc-and-disabling-desktop-effects-from-the-command-line/</link>
		<comments>http://blog.hild1.no/2011/02/05/enabling-vnc-and-disabling-desktop-effects-from-the-command-line/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 10:38:13 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=314</guid>
		<description><![CDATA[Don&#8217;t you just hate those day when you really need to access the desktop of a machine, but forgot or just never activated remote desktop? Fear not, the following lines will let you activate it from a SSH-shell: Remeber to set a password after you log in (afaik you can&#8217;t set this from cli) I [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t you just hate those day when you really need to access the desktop of a machine, but forgot or just never activated remote desktop?<br />
<span id="more-314"></span><br />
Fear not, the following lines will let you activate it from a SSH-shell:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
# display number, assuming 0
display=0

# get the machine-id
read -r machineid &lt; /var/lib/dbus/machine-id

# source the right file under .dbus to set the needed variables
. &quot;$HOME/.dbus/session-bus/$machineid-$display&quot;

# export the variables sourced from that file
export DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_WINDOWID

# Run gconftool-2:

# enable desktop sharing
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true

# disable &quot;You must confirm each access to this machine&quot;
gconftool-2 -s -t bool /desktop/gnome/remote_access/prompt_enabled false

# enable &quot;Allow other users to control your desktop&quot;
gconftool-2 -s -t bool /desktop/gnome/remote_access/view_only false
</pre>
<p><strong>Remeber to set a password after you log in (afaik you can&#8217;t set this from cli)</strong></p>
<p>I use the propiatary ATI drivers, and because of a bug i have to disable desktop effects, else the VNC windows will only show me a static desktop and no updates:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
# disable desktop effects (if your desktop
gconftool -s -t string /desktop/gnome/applications/window_manager/current /usr/bin/metacity
gconftool -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity

sudo reboot
</pre>
<h3>Sources</h3>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/353126">https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/353126</a><br />
<a href="http://ubuntuforums.org/showthread.php?t=1518231">http://ubuntuforums.org/showthread.php?t=1518231</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2011/02/05/enabling-vnc-and-disabling-desktop-effects-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SyntaxHighlighter Evolved with inline-highlight</title>
		<link>http://blog.hild1.no/2010/07/12/syntaxhighlighter-evolved-with-inline-highlight/</link>
		<comments>http://blog.hild1.no/2010/07/12/syntaxhighlighter-evolved-with-inline-highlight/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 01:00:55 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=158</guid>
		<description><![CDATA[After i first posted code for highlight-range i made some small changes to the code in the post as i found better ways of doing things. When i inserted new lines it messed with my highlighting. Inspired by pastebin.com, i wrote a couple of lines that let me specify with a marker in the code [...]]]></description>
			<content:encoded><![CDATA[<p>After i first posted code for highlight-range i made some small changes to the code in the post as i found better ways of doing things. When i inserted new lines it messed with my highlighting. Inspired by pastebin.com, i wrote a couple of lines that let me specify with a marker in the code (and not by line-number) what line should be highlighted.</p>
<p><strong>Update:</strong> Added @hr@ for inline-ranges.<br />
<span id="more-158"></span><br />
The second codeblock is inside a shortcode similar to this:</p>
<pre class="brush: plain; title: ; notranslate">
1
</pre>
<p>All the highlighting is done by @hr@-tags on line 740 and 761. Lines 747, 751 and 754 are prefixed with @h@ to show that single lines inside a (possibly) large highlighted range can be excluded. Both marker tags are removed and do not appear when displayed or in code-view.</p>
<pre class="brush: php; first-line: 736; gutter: true; title: ; notranslate">
        // Automatically enable &quot;htmlscript&quot; for certain brushes
        //if ( false === $atts['html-script'] &amp;&amp; in_array( $lang, apply_filters( 'syntaxhighlighter_htmlscriptbrushes', array( 'php' ) ) ) )
        //  $atts['html-script'] = 'true';

@hr@        // Detect and add inline highlights (@h@) and ranges (@hr@)
        $codelines = explode(&quot;n&quot;, $code);
        $h_marker = '@h@'; $h_marker_length = strlen($h_marker);
        $h_range = '@hr@';
        $atts['firstline'] = (int) $atts['firstline']; // sanitize firstline as we need it
        $hra = false; $h = false;
        foreach($codelines as $linenum =&gt; $line) { // could have used &amp;$line, but that is php5-only
@h@            if($h_marker == substr($line, 0, $h_marker_length)) {
                // could have used &quot;$line =&quot; in php
                $codelines[$linenum] = substr($line,$h_marker_length, (strlen($line) - $h_marker_length));
                $h = true;
@h@            } else if($h_range == substr($line, 0, 4)) {
                $hra = !$hra; // we swap on/of ever time we detect the tag
                $codelines[$linenum] = substr($line,4); //, (strlen($line) - 4));
@h@            }
            if($h xor $hra) { // we use xor so we can use a @h@ to escape a active $hra
                $atts['highlight'] = ($atts['highlight'] == false) ?
                    ($linenum  + $atts['firstline'] -1 ) :
                    $atts['highlight'] . ',' . ($linenum  + $atts['firstline'] -1 );
            }
            $h = false;
        }
@hr@        $code = implode(&quot;n&quot;,$codelines);

        // Sanitize row highlights
        if ( false != $atts['highlight'] ) {
</pre>
<p>New <a href="http://blog.hild1.no/quaseer/wp-content/uploads/code/syntaxhighlighter/syntaxhighlighter.inline_highlight.phps">syntaxhighlighter.php</a> with the inline-highlight-code based on SyntaxHighlighter Evolved version 2.3.8</p>
<p>New <a href="http://blog.hild1.no/quaseer/wp-content/uploads/code/syntaxhighlighter/syntaxhighlighter.inline_highlight.highlight_range.phps">syntaxhighlighter.php</a> with the inline-highlight and highlight-range-code based on SyntaxHighlighter Evolved version 2.3.8</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2010/07/12/syntaxhighlighter-evolved-with-inline-highlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SyntaxHighlighter Evolved with highlight-range</title>
		<link>http://blog.hild1.no/2010/07/07/syntaxhighlighter-evolved-with-highlight-range/</link>
		<comments>http://blog.hild1.no/2010/07/07/syntaxhighlighter-evolved-with-highlight-range/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:08:18 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=55</guid>
		<description><![CDATA[Update: As of SyntaxHighlighter Evolved v. 3.0.0 this functionality is included in the plugin. One of the first plugins i installed for this brand new WordPress was SyntaxHighlighter Evolved. I love to code, and knew i would find a use for it. To test it i used a large C++ file from cpp.snippets.org and began [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: As of SyntaxHighlighter Evolved v. 3.0.0 this functionality is included in the plugin.</strong></p>
<p>One of the first plugins i installed for this brand new WordPress was <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/">SyntaxHighlighter Evolved</a>. I love to code, and knew i would find a use for it. To test it i used a large C++ file from <a href="http://cpp.snippets.org/code/">cpp.snippets.org</a> and began <a href="http://en.support.wordpress.com/code/posting-source-code/">testing</a>.</p>
<p><code>Highlight</code> worked fine, but i i didn&#8217;t support highlighting a range of lines. This might not be so useful, as you usually want to highlight small sections, but i rewrote syntaxhighlighter.php to support ranges.</p>
<p><span id="more-55"></span></p>
<pre class="brush: plain; gutter: false; title: ; toolbar: true; notranslate">
1</pre>
<p>This expandes into</p>
<pre class="brush: xml; gutter: false; title: ; toolbar: true; notranslate">
&lt;pre class=&quot;brush: php; auto-links: false; first-line: 740; gutter: true;
highlight: [765,748,749,750,751,752,753,754,755,756,757,758,759,760,761];
html-script: false; light: false; pad-line-numbers: false;
smart-tabs: true; tab-size: 4; toolbar: true; wrap-lines: true;&quot;&gt;
</pre>
<p>after beeing parsed by my (highlighted) changes</p>
<pre class="brush: php; auto-links: false; first-line: 740; gutter: true; highlight: [748,749,750,751,752,753,754,755,756,757,758,759,760,761,765]; html-script: false; light: false; pad-line-numbers: false; smart-tabs: true; tab-size: 4; title: ; toolbar: true; wrap-lines: true; notranslate">
// Sanitize row highlights
if ( false != $atts['highlight'] ) {
@h@        if ( false === strpos( $atts['highlight'], ',' ) &amp;&amp; false === strpos( $atts['highlight'], '-' ) ) {
                $atts['highlight'] = (int) $atts['highlight'];
        } else {
                $highlights = explode( ',', $atts['highlight'] );

                foreach ( $highlights as $key =&gt; $highlight ) {
                        // if this value is a range
                        if (FALSE !== strpos($highlight, '-',1)) {
                                // we require 1 digit before the dash,
                                // if not we ignore it and pass it on
                                $range = explode('-', $highlight);
                                // Around here we should probably try to cast
                                // to int and if-check to sanitize the values
                                // loop over the range and add it to highlights
                                for(;$range[0] &lt;= $range[1]; $range[0]++){
                                        $highlights[] = $range[0];
                                }
                                // unset the current (range-type) highlight
                                unset($highlights[$key]);
                        } else {
                                $highlights[$key] = (int) $highlight;
                                if ( empty($highlights[$key]) )
                                        unset($highlights[$key]);
                        }
                }

                $atts['highlight'] = implode( ',', $highlights );
        }
}
</pre>
<p>New <a href="http://blog.hild1.no/quaseer/wp-content/uploads/code/syntaxhighlighter/syntaxhighlighter.highlight_range.phps">syntaxhighlighter.php</a> with highlight-range-code based on SyntaxHighlighter Evolved version 2.3.8</p>
<p>See also <a href="http://blog.hild1.no/2010/07/syntaxhighlighter-evolved-with-inline-highlight/">Syntaxhighlighter Evolved with inline-highlight</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2010/07/07/syntaxhighlighter-evolved-with-highlight-range/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using BankID (norwegian type) in Ubuntu 10.04</title>
		<link>http://blog.hild1.no/2010/07/06/bankid-ubuntu/</link>
		<comments>http://blog.hild1.no/2010/07/06/bankid-ubuntu/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 22:08:22 +0000</pubDate>
		<dc:creator>Anders Einar</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://blog.hild1.no/?p=11</guid>
		<description><![CDATA[Update: As of Ubuntu 10.10 this should not be nessesary, as OpenJDK in Ubuntu &#62;= 10.10 should work with BankID. In Ubuntu 10.04 (and probably onwards) OpenJDK Java and the Icedtea java plugin are the standard Java toolkit. BankID works with OpenJDK (just try installing Opera 10.10. Opera pre 10.5 use OpenJDK directly, without Icedtea), [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: As of Ubuntu 10.10 this should not be nessesary, as OpenJDK in Ubuntu &gt;= 10.10 should work with BankID.</strong></p>
<p>In Ubuntu 10.04 (and probably onwards) OpenJDK Java and the Icedtea java plugin are the standard Java toolkit. <a href="https://www.bankid.no/Hjelp-og-nyttige-verktoy/Nyttige-verktoy/Test-din-BankID/">BankID</a> works with OpenJDK <em>(just try installing Opera 10.10. Opera pre 10.5 use OpenJDK directly, without Icedtea)</em>, Icedtea is the troublemaker.<br />
<span id="more-11"></span></p>
<p>Sun Java has been pushed all the way into the Canonocal partner repository, that is not enabled as default. The following lines are a quick way to enable it and install java, even if the same is possible with lengthy GUI &#8220;click-here-then-there&#8221; tutorials.</p>
<pre class="brush: bash; auto-links: false; gutter: false; title: ; toolbar: false; wrap-lines: false; notranslate">sudo add-apt-repository &quot;deb http://archive.canonical.com/ lucid partner&quot;
sudo apt-get update
sudo apt-get install sun-java6-plugin</pre>
<p>Line one adds the Canonical Partner repository to you software sources. There should be no complications if it is already enabled. Line two updates the list of avalible packages, so that line three can find and install the package <code>sun-java6-plugin</code> and it&#8217;s dependencies.</p>
<p>Sun Java should be the standard after this, if not, try to force it to be default with this line. And remember to restart you browser (or possibly restart your system)</p>
<pre class="brush: bash; gutter: false; title: ; toolbar: false; wrap-lines: false; notranslate">sudo update-java-alternatives -s java-6-sun</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.hild1.no/2010/07/06/bankid-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

