[WordPress] Pressmark: Bookmarks with WordPress CMS

Par défaut

Pressmark with a WordPress installation with all you need to start a social bookmarking website (like del.icio.us, sabros.us, …).


You can see a demo of Pressmark installation on bookmark.alexgirard.com

Pressmark includes WordPress Prologue theme, which has been used by WordPress team to have a twitter-like dev-blog.
Prologue include Gravatar support, so go to upload your avatar on gravatar.com to have a nicer output!

If you feel like adding your own modification to the code, you can clone/fork the project on Github: http://github.com/alx/pressmark/. All contributions will be welcomed!

Ideas to extend Pressmark:

  • Bookmarlet, Jabber bot for easy posting;
  • Import from bigger social-bookmark accounts (delicious, magnolia, …)
  • Cross-blogging to decentralized bookmark management in various blog spaces

Installation

  • Get Pressmark sources:
    • Download it from Github
    • If you’ve got git installed, clone it from Github (to easily get last updated)

      git clone git://github.com/alx/pressmark.git pressmark
  • Move the source to your webserver, ask a geek how to do it if you don’t know 🙂
  • WordPress configuration: copy ‘wp-config-sample.php‘ to ‘wp-config.php‘ and fill up the MySQL database information.
  • Access to the website where you’ve installed Pressmark, and begin the « 2 min. installation » from WordPress
  • Now that your website is ready, go in the administration pages and activate the following options:
    • In ‘Design‘: select ‘Prologue‘ theme;
    • In ‘Setting‘: select ‘Anyone can register‘ and set the ‘New User Default Role‘ to ‘Author‘ if you want your users to post links;
    • In ‘Plugins‘: activate ‘WP-OpenID‘ plugin

[Nginx] fastcgi configuration on Centos

Par défaut

After a week of « 502 Bad Gateway » error on blog.feevy.com, it was time to dive in our new Nginx toy on Feevy server and understand what happened.

First, Nginx is not like Apache or Lighttpd, it doesn’t support FastCGI by default. So, you need to be sure you’ve compiled the fcgi module with your PHP installation.

On Centos, to compile a new PHP, just launch: /scripts/easyapache

Then you’ll need to launch the FastCGI process, download this FastCGI script, place it in /usr/local/bin, and add it to your init.d.

At the end, you just need to configure your php server in nginx, that would be the most simple part:

  server {
      listen 80;
      server_name     blog.feevy.com;
      index           index.php;
      root            /home/wwwfeev/blog;

      if (!-e $request_filename) {
        rewrite  ^(.*)$  /index.php?q=$1  last;
        break;
      }

      location ~ .php$ {
         fastcgi_pass  127.0.0.1:9999;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_NAME $fastcgi_script_name;
         fastcgi_param REQUEST_URI $request_uri;
         fastcgi_param DOCUMENT_URI $document_uri;
         fastcgi_param DOCUMENT_ROOT $document_root;
         fastcgi_param REMOTE_ADDR $remote_addr;
         fastcgi_param REMOTE_PORT $remote_port;
         fastcgi_param SERVER_ADDR $server_addr;
         fastcgi_param SERVER_PORT $server_port;
         fastcgi_param SERVER_NAME $server_name;
         fastcgi_param SCRIPT_FILENAME  /home/wwwfeev/blog/$fastcgi_script_name;
         fastcgi_param QUERY_STRING $query_string;
         fastcgi_param REQUEST_METHOD $request_method;
         fastcgi_param CONTENT_TYPE $content_type;
         fastcgi_param CONTENT_LENGTH $content_length;
      }
  }

[RepRap] Stepper motors ready

Par défaut

Sorry for all the people who couldn’t watch the Reprap move in 3D last friday in Bilbao, it’s finally working tonight!

The code to control the robot is really elegant, and it was not really hard to find the missing part to make it work properly.
I’ve also add a setMax() method on the axises, so the hardware opto-endstop are not needed anymore. but it’ll be cool to keep them just to use them to set the print-header home. I think I’ve seen some example like this somewhere, but I’m not usre yet how it works.

People interesting in downloading/cloning/forking the Arduino firmware for Reprap can go to the project page on Github.

[Textmate] Arduino Bundle

Par défaut

After first days with the Darwin machine, it became clear that something was needed to replace the current Arduino software and upload the RepRap firmware directly from Textmate.

So here comes my first Textmate Bundle, thanks to the elegant work of Arduino team to make it easier to upload program from command line:

Arduino.tmbundle

Once installed, only one shortcut is available to make and upload your program on the Arduino board: Command-Shift-A

You can clone/fork the project from Github too, make your own repository and I’ll be glad to add your patch to the current simple bundle.
And come back during the week, you’ll surely see some update during the intensive RepRap hack session!

[WordPress] Register hooks hacks

Par défaut

On the way to launch Live Clöthing, I had to hack this morning the register action hooks for WordPress, that don’t work as simply as excepted.

‘register_post’ action

You won’t be able to add more errors in $errors if you do not make it global in register_new_user() of wp-login.php:

function register_new_user($user_login, $user_email) {
global $errors;

‘user_register’ action

For some strange reason, $user_id is not available, you’ll need to add this hack to read it in your hook function:

$user_id = (int) func_get_arg( 0 );

[Jabber] Delicious Bot

Par défaut

Because when I see a good link, my main pleasure is to send it to as many friends as possible on IM, here is a simple jabber bot I could use to also save these links to my delicious account:

Download from github.com

It uses jabber-bot and rdelicious gem for ruby, you just need to configure the config.yml with your jabber and delicious login information and maje it run with:

ruby delicious-bot.rb

The bot will connect to the master jabber you’ve configured in the config.yml, and you just need to send him the bookmark command:

bookmark url description

You can add your commands easily inside the bot, and fork the project from Github.com:

Delicious-bot project on github.com