Nederland is gek

December 13th, 2009 No comments

Picture 148 Nederland is gek, zojuist de 5 best gelezen posts van nu.nl, 3 geweld en 1 belachelijk… I rest my case…

Twitter on your site

December 13th, 2009 No comments

I’ve written a quick and dirty javascript for including twitter feeds on your website or blog. Just like to share it here for my own backup purposes and maybe for others to use. As always: no warrantees :)

<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/revspacenl.json?callback=twitterCallback2&count=10"></script>
<div id="tweets"></div>
<script type="text/javascript">
function twitterCallback(json)
{
    output = document.getElementById('tweets');
    for(i=0;i<json.length;i++)
        output.innerHTML += '<a href="http://twitter.com/revspacenl/status/'+json[i].id+'">' + json[i].text + "</a><br />";
}
</script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/revspacenl.json?callback=twitterCallback&count=10"></script>

RPM Specs argument handling

November 3rd, 2009 No comments

When building RPM’s it is possible to use post and pre install/uninstall hooks. These get sometimes some parameters to determine if you are upgrading or uninstalling. This could be handy when creating users while installing. So it is crucial to know these and I always forget them

install upgrade uninstall
%pretrans $1 == 0 $1 == 0 (N/A)
%pre $1 == 1 $1 == 2 (N/A)
%post $1 == 1 $1 == 2 (N/A)
%preun (N/A) $1 == 1 $1 == 0
%postun (N/A) $1 == 1 $1 == 0
%posttrans $1 == 0 $1 == 0 (N/A)
Tags: , ,

Zo klinkt het internet in 2010

October 7th, 2009 No comments

Zo zal het internet in 2010 gaan klinken als de plannen van BUMA doorgaan.

Via: http://jemaakthetinleiden.nl/content/fluit-buma-stemra-terug-reageer-onderaan-dit-item
Read more…

Tags: ,

23!

September 12th, 2009 No comments

En toen was ik alweer 23! Happy B-Day to me

Tags:

Groetjes de mexicaanse griep

August 17th, 2009 No comments

“Heey jij. Ik heb je bijna te pakken en als ik je heb, laat ik je voorlopig niet meer gaan. Ik zal je eerst een paar dagen plagen, maar ik weet zeker dat ik je daarna in bed krijg. Groeten: de Mexicaanse Griep”

Tags: , ,

Random password in bash

August 10th, 2009 No comments

With /dev/urandom you can generate some nice random passwords. Very usefull in scripts :-)
dd if=/dev/urandom bs=1 count=1024 status=noxfer 2> /dev/null | strings | tr -d [:space:] | tr -d [:punct:] | dd bs=1 count=20 status=noxfer 2> /dev/null

Tags:

Syslog-ng messages to bash script

June 22nd, 2009 No comments

I am falling more and more in love with syslog-ng. After some trial and error I’ve finally configured to parse messages and send them to zabbix for statistics logging. Sounds cool uh? Well it is.

Of course the posibilities are endless when you think about it. For me it is just sake to get performance messages from our application into zabbix to get triggered about problems.

Read further to found out how I did it
Read more…

Find evil hidden iframe’s

June 19th, 2009 No comments
find / -type f -name '*.htm' -exec egrep -H '<iframe src="(.*?)visibility: hidden' {} \;

And change .htm with every extension you suspect (php, html, js)

Tags: ,

Apache + SVN + LDAP

June 6th, 2009 No comments

Just because I always forget:

<VirtualHost 192.168.1.34:7000>
    <Location />

        DAV svn
        SVNPath /data/svn

        SVNReposName    "Subversion"
        AuthName        "Authenticate for Subversion"

        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative on
        AuthLDAPUrl ldap://192.168.1.33/dc=kerneldump,dc=org?uid
        Require ldap-group cn=svnusers,ou=Group,dc=kerneldump,dc=org
        AuthLDAPGroupAttribute memberUid
        AuthLDAPGroupAttributeIsDN off
        Order deny,allow
        Allow from all

    CustomLog /var/log/httpd/svn_access_log combined
    ErrorLog  /var/log/httpd/svn_error_log
  </Location>
</VirtualHost>

Put this in an configuration file like mysvn.conf and include it in your httpd.conf file. This creates an virtualhost on port 7000 with immediately in the root the subversion repository. Of course you need to configure your LDAP configuration. Or need to use basic authentication.

For security purposes not every LDAP user is allowed, you need to be member of the svnusers group.

UPDATE Read more…

Tags: , , ,