Blogue

Plugin jQuery: fieldSelection

August 8th, 2009 / by Wibeset / 0 comment

Le plugin fieldSelection permet d’obtenir du texte sélectionné et de la replacer. Très léger et très pratique lorsque vous développer votre propre Rich Text Editor.

Total Wireframe – Une banque de modèle pour le prototyping…

June 23rd, 2009 / by Wibeset / 0 comment

Total Wireframe est une shop de components pour l’outil de prototypage Axure. Vous y trouverez plein de modèle pour vos prototypes comme la boîte de Facebook Connect, Google maps, un player Vimeo, un player Youtube, etc.

Alors si vous prototypez sur Axure, allez tout de suite sur Total Wireframe. :)

Oh, et pour les Twitteux de ce monde, suivez Total Wireframe sur @totalwireframe.

Du mouvement…

June 21st, 2009 / by Wibeset / 0 comment

À partir d’aujourd’hui, http://wibe7.tv devient http://tv.wibeset.com et http://propulse.ca devient http://propulse.wibeset.com.

Client PHP5 pour Twitter

April 5th, 2009 / by Wibeset / 0 comment

Mini client PHP5 pour mettre à jour votre statut sur Twitter:

<?php

/**
 * Twitter client
 *
 * @see Twitter
 * @see Twitter API documentation
 *
 */

class twitter {

  protected $url = "http://twitter.com/";

  /**
   * cURL instance
   */
  protected $ch = null;

  /**
   * Authentication
   */
  protected $username = '';
  protected $password = '';
  protected $authentication = '';

  /**
   * Constructor
   */
  public function __construct() {
    $this->ch = curl_init();
    curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($this->ch, CURLOPT_HEADER, 0);
    curl_setopt($this->ch, CURLOPT_VERBOSE, 0);
  } // __construct()

  /**
   * Destructor
   */
  public function __destruct() {
    curl_close($this->ch);
  } // __destruct()

 /**
   * Set user authentication
   *
   * @param username (string)
   * @param password (string)
   *
   */
  public function set_authentication($username, $password) {

    $this->username = $username;
    $this->password = $password;
    $this->authentication = $this->username.':'.$this->password;

  } // set_authentication()

  /**
   * Update the authenticating user's status
   * Authentication must be setted.
   *
   * @param status_text (string) new user's status
   *
   */
  public function update($status_text) {

    curl_setopt($this->ch, CURLOPT_URL, $this->url."statuses/update.json");
    curl_setopt($this->ch, CURLOPT_USERPWD, $this->authentication);
    curl_setopt($this->ch, CURLOPT_POST, 1);
    curl_setopt($this->ch, CURLOPT_POSTFIELDS, array('status' => $status_text));

    $result = curl_exec($this->ch);

    return json_decode($result, true);

  } // update()

} // twitter

Demo:

 $twitter = new twitter();
  $twitter->set_authentication('username', 'password');
  $twitter->update('hello from my new php5 client :)');

Pré-requis: cURL enabled et PHP >= 5.2.0

Highlighter son code dans un billet…

March 27th, 2009 / by Wibeset / 0 comment

J’ai découvert récemment un petit plugin JavaScript vraiment cool qui permet d’highlighter du code. D’ailleurs, je l’ai utilisé pour la première fois dans le billet “Obtenir un permalink en JavaScript“.

Ce plugin supporte les langages suivant: C++, PHP, Javascript, CSS, C#, Delphi, Java, Python, Ruby, Sql, VB et XML/HTML.

Google Syntax Highlighter

Un court aperçu Php:

  <?php

  // Best PHP script I ever made ;)
  echo 'Hello world!';