1
Fork 0
This commit is contained in:
Jan-Erik Rediger 2011-08-25 12:20:25 +02:00
commit 33d50fde7b
22 changed files with 462 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
_site

20
404.html Normal file
View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<base href="//fnordig.de/">
<title>fnordig.de</title>
<link rel="stylesheet" href="/fnord.css" type="text/css" />
<style type="text/css">
div { text-align: center; height: 400px; }
h2:before { content: '/* '; }
h2:after { content: ' */'; }
</style>
</head>
<body>
<div>
<h1>404 - fnord not found</h1>
<h2>damn. we can't find what you are searching. move on.</h2>
</div>
</body>
</html>

20
50x.html Normal file
View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<base href="//fnordig.de/">
<title>fnordig.de</title>
<link rel="stylesheet" href="/fnord.css" type="text/css" />
<style type="text/css">
div { text-align: center; height: 400px; }
h2:before { content: '/* '; }
h2:after { content: ' */'; }
</style>
</head>
<body>
<div>
<h1>something went wrong</h1>
<h2>this should never ever happen. but it did. so what now?</h2>
</div>
</body>
</html>

32
Rakefile Normal file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env ruby
# encoding: utf-8
PRODUCTION = {
:url => "http://fnordig.de",
:dest => "/var/www/sites/fnordig.de.test",
:source => "/home/badboy/git/fnordig.de/_site"
}
desc 'Generate page using jekyll'
task :generate do
sh "jekyll"
end
desc 'Serve the page on http://localhost:4000'
task :serve do
sh "jekyll --serve --auto"
end
namespace :deploy do
desc 'Deploy the page on the production machine (executed on production)'
task :production do
verbose(true) {
sh <<-EOF
git reset --hard HEAD &&
git pull origin master &&
rake generate
cp -ar #{PRODUCTION[:source]}/* #{PRODUCTION[:dest]}
EOF
}
end
end

5
_config.yml Normal file
View file

@ -0,0 +1,5 @@
pygments: true
paginate: 5
permalink: pretty
markdown: rdiscount
exclude: Rakefile

View file

@ -0,0 +1,10 @@
<div class="post">
<h2 class="heading">
<a href="{{post.url}}">{{post.title}}</a>
</h2>
{% if post.date %}
<p class="date">{{post.date | date_to_string}} (by Jan-Erik)</p>
{% endif %}
{{post.content}}
</div>

35
_layouts/default.html Normal file
View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>fnordig.de</title>
<link rel="stylesheet" href="/fnord.css" type="text/css" />
</head>
<body>
<div class="content">
<div class="nav">
<h1>
<a href="/">fnordig</a>
</h1>
<ul>
<li><a href="/about/">about</a></li>
<li><a href="/feed.xml">feed</a></li>
<li>| links:</li>
<li><a href="https://twitter.com/badboy_">@badboy_</a> /</li>
<li><a href="https://github.com/badboy">github</a></li>
</ul>
</div>
{{content}}
<div class="footer">
<p>//
&nbsp;&nbsp;jan-erik /
<a href="http://twitter.com/badboy_">@badboy_</a> /
<a href="/impress/">impress</a> /
<a href="/feed.xml">feed</a>
</p>
</div>
</div>
</body>
</html>

13
_layouts/post.html Normal file
View file

@ -0,0 +1,13 @@
---
layout: default
---
<div class="post">
<h2 class="heading">
<a href="{{page.url}}">{{page.title}}</a>
</h2>
{% if page.date %}
<p class="date">{{page.date | date_to_string}} (by Jan-Erik)</p>
{% endif %}
{{content}}
</div>

View file

@ -0,0 +1,13 @@
---
layout: post
title: blog? static!
date: 15.01.2011 15:54
---
static blog with just one file ;)
Fnord News Show @ c3:
* [Fnord-Jahresrückblick 2010 (27c3)](http://events.ccc.de/congress/2010/Fahrplan/events/4070.en.html)
* [Fnord-Jahresrückblick 2009 (26c3)](http://events.ccc.de/congress/2009/Fahrplan/events/3613.en.html)
* [Fnord News Show (25c3)](http://events.ccc.de/congress/2008/Fahrplan/events/2812.en.html)

View file

@ -0,0 +1,7 @@
---
layout: post
title: fnord?
date: 15.01.2011 01:34
---
fnordig? WTF ist fnord? [Fnord](http://de.wikipedia.org/wiki/Fnord)

View file

@ -0,0 +1,7 @@
---
layout: post
title: fnordig is up and running
date: 15.01.2011 00:04
---
fnordig is up and running!

View file

@ -0,0 +1,8 @@
---
layout: post
title: error pages
---
I just added more "fnordig-like" error pages
see them in action: [404](http://fnordig.de/404.html) & [50x](http://fnordig.de/50x.html)

View file

@ -0,0 +1,45 @@
---
layout: post
title: sshuttle - poor man's vpn
---
> [sshuttle](https://github.com/apenwarr/sshuttle) is a transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin access. Works with Linux and MacOS, now including 10.6
It's as simple as
$ ./sshuttle -r username@sshserver 0.0.0.0/0 -vv</code></pre>
and everything is tunneled through the ssh connection.
All you need is iptables, root access on the local machine and a python binary on server side. No root, no iptables, no extra program running on your server.
Of course you may tunnel just some IPs. Just change the argument to whatever ip network you need.
$ dig www.youtube.com
[ ... find youtube's ip ... ]
$ ./sshuttle -r username@sshserver 74.125.39.0/24 -vv</code></pre>
and every request to Youtube gets tunneled. Great for "This video is not available in your country"-videos if you've got ssh access to a server with an US IP.
I use it for exactly that case: tunneling Youtube requests to view videos. But sometimes, when I exit sshuttle it fails before removing the iptable rules.
As sshuttle is just some python code wrapped around the iptables cli, I figured out what I needed to remove:
$ iptables -t nat -D OUTPUT -j sshuttle-12300
$ iptables -t nat -D PREROUTING -j sshuttle-12300
$ iptables -t nat -F sshuttle-12300
$ iptables -t nat -X sshuttle-12300
Maybe you have to change the "12300" to something else, use the following command to figure this out:
$ iptables -t nat -L
(or just read the verbose output)
For more info about how it works and so on read the [README](https://github.com/apenwarr/sshuttle/blob/master/README.md).
Don't forget to read the help if you've got an unusual setup or other problems (some weird path to the python binary on the server, auto-updating hosts file needed, different subnets and excluded subnets, ...):
$ ./sshuttle -h
Works pretty good and it's secure, so use it!

View file

@ -0,0 +1,12 @@
---
layout: post
title: static blog system runs!
---
my small and simple blog system works!
It's just a short javascript file. I just cat the text through a ssh connection into this [script](http://tmp.fnordig.de/post.js). It parses the content using [markdown-js](https://github.com/evilstreak/markdown-js) and re-writes the index.html file.
This way I can write a post wherever I have ssh access to my server (and as I've got a smartphone, that's nearly everywhere).
So have fun!

View file

@ -0,0 +1,30 @@
---
layout: post
title: static blog system improved
---
My static blog system script now launches a small web server and auto-updates on a file change. This way you've got a live preview directly in your browser.
As the inital script was written in Javascript, I wrote the rest in Javascript, too.
The whole runs on [node.js](https://github.com/ry/node) and uses some fancy modules:
* [paperboy](https://github.com/felixge/node-paperboy) for static file delivery (the css file)
* [socket.io-node](https://github.com/LearnBoost/Socket.IO-node) as the websocket server
* [socket.io](https://github.com/LearnBoost/Socket.IO) injected into the html, so the website auto-reloads when informed through the server
The whole combination is amazingly fast, the updated text nearly appears in realtime.
You can find the script here: [watch.js](http://tmp.fnordig.de/watch.js). It's more like a quick hack and not fully tested. It may crash whenever it will, but for now it works for me :)
The small app.js is just this:
<pre><code>socket = new io.Socket('localhost');
socket.connect();
socket.on('message', function(data){
data = JSON.parse(data);
if(data.reload)
window.location.reload();
});</code></pre>
So next thing: individual pages for posts, maybe templates.

View file

@ -0,0 +1,37 @@
---
layout: post
title: ipv6 with nodejs
---
As there are just a few new ipv4 address left in the pool and even those will be [exhausted in under a week](http://inetcore.com/project/ipv4ec/index_en.html) (6 days left, checked right now) the switch to [IPv6](http://en.wikipedia.org/wiki/Ipv6) will be necessary soon.
My current ISP does not offer any real IPv6 connection and not even my router can handle IPv6 (yet) there's currently no (good & easy) way for me to use IPv6 from here.
But aside from that fact, my vserver running this blog now has IPv6 addresses (and can even get more).
[v6.fnordig.de](http://v6.fnordig.de) is available via IPv6, but there's no service running yet.
I will make this blog accessible via IPv6 soon.
As I really like [node.js](http://nodejs.org/) I wanted to know how it handles v6 addresses and found [this article on code.danyork.com](http://code.danyork.com/2011/01/20/testing-node-js-with-ipv6-first-step-does-it-work/).
It's as easy as this:
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type":"text/plain"});
response.end ("Hello World!\n");
console.log("Got a connection");
});
server.listen(80, "2a01:xxxx:xxxx:xxxx::2");
console.log("Server running on localhost at port 80");
Just pass the IPv6 address as the host parameter to `server.listen`.
This listens on just one IP; it's possible to listen on all, similar to the `0.0.0.0` for IPv4:
server.listen(80, "::0");</code></pre>
Other things worth to mention:
* [World IPv6 Day](http://isoc.org/wp/worldipv6day/): major organisations (Google, Facebook, Yahoo, ...) will offer their content over IPv6 on 8 June, 2011
So get going and use IPv6!

View file

@ -0,0 +1,20 @@
---
layout: post
title: Blog running on jekyll again
---
I decided to setup a blog again. And again I'll use [jekyll][], a `blog-aware, static site generator in Ruby`.
I redesigned the page for better viewing (a layout for smartphones will follow).
What's still missing is a good deployment process. I'm currently thinking about using [github][] for the repository and having my server informed by their post-receive hook.
Ah, and of course some content. I will use this blog to document the things I do. May it be some weird configuration thing for my server or just some code I wrote or read the other day (and for that I need code highlighting here, I really would appreciate if I could use [CodeRay][] somehow)
I'm not yet sure if and how I will implement an option to comment on this site. I'm currently thinking about wether it would be possible to fetch comments via twitter and if that would be enough.
So as long as there is no direct comment integration here, feel free to contact me over at twitter: [@badboy_](https://twitter.com/badboy_).
[jekyll]: https://github.com/mojombo/jekyll
[github]: https://github.com/
[CodeRay]: https://github.com/rubychan/coderay

6
about.markdown Normal file
View file

@ -0,0 +1,6 @@
---
layout: post
title: about
---
_coming soon_

26
feed.xml Normal file
View file

@ -0,0 +1,26 @@
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>fnordig.de</title>
<link href="http://fnordig.de/feed.xml" rel="self"/>
<link href="http://fnordig.de/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>http://fnordig.de/</id>
<author>
<name>Jan-Erik Rediger</name>
<email>janerik@fnordig.de</email>
</author>
{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="http://fnordig.de{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>http://fnordig.de{{ post.url }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
</feed>

64
fnord.css Normal file
View file

@ -0,0 +1,64 @@
body {
background-color: #eee;
color: #1a1a1a;
font-family: monospace;
}
a { color: #06c; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 a, .heading a { color: black; }
h1 a:hover { text-decoration: none; }
/*a:visited { color: green; }*/
.post .heading:before { content: "// "; }
.post h2 { margin: 0; }
.post p.date { margin: 0; font-style: italic; }
.post p.date:before { content: "/* "; }
.post p.date:after { content: " */"; }
.post p {
word-wrap: break-word;
}
.footer { padding-top: 0px; }
.footer p { padding: 0; margin: 0;}
blockquote {
margin-left: 10px;
padding-left: 10px;
border-left: 1px solid gray;
}
pre {
margin-left: 10px;
background-color: #ddd;
padding: 5px;
box-shadow: 0px 0px 2px #666;
}
.post {
margin-bottom: 15px;
padding: 20px;
padding-top: 10px;
padding-bottom: 5px;
background-color: white;
box-shadow: 0px 0px 2px #666;
}
.nav {
margin-bottom: 10px;
}
.nav h1, .nav ul, .nav li {
display: inline;
}
.nav ul {
}
.content {
width: 986px;
margin: 0 auto;
}
.paginator {
margin-bottom: 10px;
text-align: center;
}

25
impress.markdown Normal file
View file

@ -0,0 +1,25 @@
---
layout: post
title: impress
---
Jan-Erik Rediger<br>
Schäferstr. 27<br>
D-59174 Kamen<br>
impress {ät} fnordig {dot} de
## Zusatzbestimmungen / Extra
Einer kommerziellen Nutzung (auch unangeforderte Werbung etc.) der Anschrift / Mail-Adresse widerspreche ich hiermit ausdrücklich.
I disagree with any commercial use (that includes any advertisement) of my adress information.
## Urheberrechtshinweis / Copyright
Alle Inhalte dieses Internetangebotes, insbesondere Texte, Fotografien und Grafiken, sind urheberrechtlich geschützt (Copyright).
Das Urheberrecht liegt, soweit nicht ausdrücklich anders gekennzeichnet, bei mir, Jan-Erik Rediger.
Bitte fragen Sie mich, falls Sie die Inhalte dieses Internetangebotes verwenden möchten.
All contents of this website, especially texts, pictures and images are under a copyright.
The copyright is, if not stated otherwise, mine, Jan-Erik Rediger.
If you want to use any of this, please contact me first.

26
index.html Normal file
View file

@ -0,0 +1,26 @@
---
layout: default
title: fnordig.de
---
{% for post in paginator.posts %}
{% include single_page.html %}
{% endfor %}
<div class="paginator">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="prev" href="/">« Previous page</a>
{% else %}
<a class="prev" href="/page{{paginator.previous_page}}">« Previous page</a>
{% endif %}
{% endif %}
{% if paginator.previous_page && paginator.next_page %}
|
{% endif %}
{% if paginator.next_page %}
<a class="next" href="/page{{paginator.next_page}}">Next page »</a>
{% endif %}
</div>