Not My Idea — Snippets

Some code snippets about Linux / Php and Python

What do I read ? (RSS Feeds)

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
    <head>
        <title>Alexis Metaireau subscriptions in Google Reader</title>
    </head>
    <body>
        <outline text="Clément Delafargue // Divarvel"
           title="Clément Delafargue // Divarvel" type="rss"
           xmlUrl="http://www.divarvel.fr/rss/" htmlUrl="http://www.divarvel.fr"/>
        <outline text="DLFP – Dépêches de page principale"
  [...]

Using Scribe log server with PHP.

In a previous post, I was talking about howto install Scribe on a debian system.
Now, let’s talk about howto launch the server properly, and how to use it’s functionalities with PHP:
Starting Scribe
I’ve created the /usr/local/scribe/scribe.conf file, with this default content (it will configure scribe to listen port 1463 and write logs to /tmp/scribetest
port=1463
max_msg_per_second=2000000
check_interval=3

# DEFAULT
<store>
category=default
type=buffer

target_write_size=20480
max_write_interval=1
buffer_send_rate=2
retry_interval=30
retry_interval_range=10

<primary>
type=file
fs_type=std
file_path=/tmp/scribetest
base_filename=thisisoverwritten
max_size=1000000
add_newlines=1
</primary>

<secondary>
type=file
fs_type=std
file_path=/tmp
base_filename=thisisoverwritten
max_size=3000000
</secondary>
</store>
Now, start [...]