sudo write with vim
In case you edited a file only writable by root (or another user) in vim with an unprivileged user and now want to save it without using a temporary file (and copying back this files using sudo afterward), just issue the following command instead of ':w':
:w !sudo tee %
Manpage direkt aus VIM aufrufen
Man lernt nie aus:
<Shift>-Kin vim zeigt die Manpage zum entsprechenden Wort unter dem Cursor. Gibt man davor eine Zahl ein, wird die Manpage aus der entsprechenden Section angezeigt. Danke Alex :-)
Tagcloud
Damit ich's nicht gleich wieder vergesse, die Anleitung aus dem Flux CMS DevBlog:
- Collection mit Namen "tagcloud" erstellen
- Davon die .configxml editieren und den folgenden Code einfügen:
<?xml version="1.0"?> <bxcms xmlns="http://bitflux.org/config"> <plugins> <parameter name="xslt" type="pipeline" value="tagcloud.xsl"/> <plugin type="navitree"> </plugin> <plugin type="tagcloud"> <parameter name="locations" value="/blog/"/> <parameter name="maxfontsize" value="56"/> <parameter name="minfontsize" value="20"/> </plugin> </plugins> </bxcms> - Das folgende in
themes/<theme-name>/tagcloud.xslablegen:<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:blog="http://bitflux.org/doctypes/blog" xmlns:bxf="http://bitflux.org/functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:php="http://php.net/xsl" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="xhtml"> <xsl:import href="master.xsl"/> <xsl:import href="../standard/common.xsl"/> <xsl:output encoding="utf-8" method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/> <xsl:template name="content"> <p id="tagcloud"> <xsl:for-each select="/bx/plugin[@name='tagcloud']/tagcloud/tag"> <a href="{$webrootW}{path}archive/tag/{name}" style="font-size:{size}px;"> <xsl:value-of select="name"/> </a>  </xsl:for-each> </p> </xsl:template> </xsl:stylesheet> - Et voilà
Unter OpenBSD sshd und sendmail neu starten
Aus aktuellem Anlass:
# kill -HUP `cat /var/run/sshd.pid`
# kill `head -n1 /var/run/sendmail.pid` # . /etc/rc.conf.local # /usr/sbin/sendmail $sendmail_flags
oder auch nur
# kill -HUP `head -n1 /var/run/sendmail.pid`
um die Konfiguration neu zu laden.
1-6/6

