McGivrer's Home

life of french web solution architect

  • Maven and Encoding ?

    • 16 May 2012
    • 0 Responses
    •  views
    • encoding java maven
    • Edit
    • Delete
    • Tags
    • Autopost

    How to set a specific encoding against the default one ?

    Just add the following configuration lines into your pom.xml:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <encoding>ISO-8859-1</encoding>
            <source>1.5</source>
            <target>1.5</target>
        </configuration>
    </plugin>
    
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
            <encoding>ISO-8859-1</encoding>
        </configuration>
    </plugin>

    The <encoding> tag specify the one needed.
    Can be applied on the compiler plugin and on the resource plugin.

    The <source> and <target> tags can be set to specify Java version compatibility of source and target.
    Can be applied on the compiler plugin.

    McG.

    • Tweet
  • Sublime Text 2 : the "killer" source editor !

    • 20 Apr 2012
    • 2 Responses
    •  views
    • editor osx ubuntu windows
    • Edit
    • Delete
    • Tags
    • Autopost

    Walking the web, i've found the ultimate text editor.

    A multi-platform editor

    It's like TextMate on OS-X and bring a lots of fantastic feature like a "distraction free" mode, displaying your current text in a fullscreen format without anything else like menubar or status bar. Only a big black screen with synthaxe highlighted text.

    Ok, for coder it's not heaven, but with all the snippets, plugins, console, templates, and more (Column edtion mode, etc...)

    Sublime Text in its second edition is not only a good editor but also a beautiful one: see screen captures bellow on Linux (Ubuntu 11.10):

    Capture_du_2012-04-20_011516
    figure 1 : The text editor with all features activated:
     project explorer, console, and mini-map mode.
    Capture_du_2012-04-20_012004
    figure 2 : Here is the Famous Distraction Free Mode
    for Hardcore developers :)

    This Very good "professional" text editor is quiet stable, during all my edition sessions: no bug, no crash!  

    Very good work, guy's !

    I also like the easy way to create plugin (complexe one can be implemented because of the Python embbeded engine !).

    Create a plugin from scratch

    You just have to create a new Directory in the "~/.config/sublime-text-2/Packages/" named with your new extension name to create.

    The create a new *.py file script with the name to be used in the configuration file (see later). For exemple "open_google". just copy and paste the following peace of code bellow :

    import sublime, sublime_plugin, webbrowser
    
    #
    # Open the default browser to seach for the selected text in Google 
    # (or any other search engine, through Default.sublie-keymap parameters)
    # sample:
    # { "keys": ["ctrl+alt+g"] , 
    #   "command": "open_browser" , 
    #   "args": {"url" : "http://www.google.fr/#hl=fr&output=search&sclient=psy-ab&q={search}&oq={search}"}
    #
    # where *search* is the selected string to serach for.
    #
    class OpenBrowserCommand(sublime_plugin.TextCommand):
    
            def run(self, edit, url):
                    selection = ""
                    for region in self.view.sel():
                            selection += self.view.substr(region)
                    webbrowser.open_new_tab(url.format(search=selection))

    , and update the  keybinding user (CTRL+P and select "Default (Windows).sublime-keymap" file and paste the following lines:

    [
         {
              "keys": ["ctrl+alt+g"] ,
                  "command": "open_browser" ,
                  "args": {"url" : "http://www.google.fr/#hl=fr&output=search&sclient=psy-ab&q={search}&oq={search}"}
          }
    ]

    Save the files and try to select some text in any sublime editor window, and then press a magic [CTRL]+[ALT]+[G]...

    Your default Web browser would open a new tab and display result of the google search with the selected text.

    Have fun !

     

    • Tweet
  • Samsung have its own PPA !

    • 15 Apr 2012
    • 0 Responses
    •  views
    • Rxxx ppa samsung ubuntu
    • Edit
    • Delete
    • Tags
    • Autopost

    Yes !

    All Samsung laptops will need this PPA repository : ppa:voria/ppa

    Linux_on_my_samsung_-_fortunato_ventre

    Installing these useful tools is very easy, just follow the next command lines:

    sudo add-apt-repository ppa:voria/ppa
    sudo apt-get update
    sudo apt-get install samsung-tools samsung-backlight samsung-wireless

    That's all.

    have fun !

    • Tweet
  • Restore backlight on Ubuntu ?

    • 12 Apr 2012
    • 0 Responses
    •  views
    • Q210 backlight linux samsung ubuntu
    • Edit
    • Delete
    • Tags
    • Autopost

    Using Ubuntu as main OS for years now on all Laptop and desk
    top at home, I am regularly in front of common problems. But one of the most anoying is the "backlight off bug",

    Samsung-q210

    Sometimes, after kernel update, my laptop LCD decide to stay off, for unknown reason.

    So only one way to restore it:

    sudo vbetools dpms on

    This is the only solution I have found to restore the "ON" state.

    After any reboot, the LCD stay ON.

    Ubuntu is sometimes frustrating for newbies. So here is ONE solution.

    Have Fun(buntu ?) 

    • Tweet
  • How to solve REALTEK 8192 driver on Ubuntu ?

    • 4 Apr 2012
    • 0 Responses
    •  views
    • hibernate r8192 realtek suspend ubuntu
    • Edit
    • Delete
    • Tags
    • Autopost

    Using for 2 years a Samsung R580 laptop, I am in front of a annoying issue relaying on thethe realtek R8192e_pci for wifi device.

    Each time I am closing the screen, the laptop switch to hibernate mode. But when I open it again, Wifi stay off !

    So here is the solution:

    r8192e_pci

    This will install the module at boot time.

    An addtional note. This wireless driver seems to cause problems with the power manager sleep (suspend) and hibernate modes. There is a fix for this that worked on my netbook. Edit /usr/lib/pm-utils/sleep.d/55NetworkManager to read as shown below adding the lies in bold:

    Code:

    case "$1" in 
     hibernate|suspend)
       modprobe -r r8192e_pci 
       suspend_nm
       ;; 
     thaw|resume)
       modprobe r8192e_pci 
       resume_nm
       ;; 
     *)
       exit $NA 
       ;; 
    esac

    Thanks to this post http://ubuntuforums.org/showthread.php?t=1457592&page=14#td_post_9173699

     

    Have fun !

    • Tweet
  • Box.com en davfs sur Ubuntu !

    • 26 Jan 2012
    • 0 Responses
    •  views
    • box.com dav linux ubuntu
    • Edit
    • Delete
    • Tags
    • Autopost

    Connaissez vous le  site www.box.com qui propose du stockage en ligne gratuit à hauteur de 5Go ?

    Si non, courrez vous créer un compte pour stocker tous les fichiers qui vous sont vitaux.

    Donc, un fois votre compte en main, vous allez pouvoir le monter comme un disque local sous linux avec les informations suivantes !

    Tout d'abord,  commençezs par installer l'outil magique qui va permettre d'accèder au repertoire DAV distant sur box.com

      #> sudo apt-get install davfs2

    Maintenant, créez un répertoire box.com dans votre répertoire personnel:

      #> mkdir ~/box.com

    Ensuite, éditez le fichier fstab décrivant les volumes monté au démarrage (vos disques connus de linux):

      #> sudo gedit /etc/fstab

    Et ajouter la ligne ci-dessous:

      https://www.box.com/dav /home/[username]/box.com davfs rw,user,noauto 0 0

    où [username] est votre nom d'utilisateur linux.

    Ensuite, créons l'espace de stockage de nom / password pour le nouveau point de montage DAV.

    Créez un répertoire .davfs2 dans votre $HOME

      #> mkdir  ~/.davfs2
      #> cp /etc/davfs2/davfs2.conf ~/.davfs2
      #> sudo cp /etc/davfs2/secrets ~/.davfs2
      #> sudo chown $USER ~/.davfs2/secrets

    Et éditez le fichier ~/.davfs2/secrets  pour ajouter une ligne de la forme:

      https://www.box.com/dav    [box.username]    [box.password]

    où [box.username] et [box.password] sont respectivement les nom et mot de passe utilisateur de votre compte box.com.

     Maintenant la commande magique:

      #> mount ~/box.com

    Et voila, vous avez accès à vos fichiers présents sur votre compte box.com !

    Pour démonter le lecteur box.com, simple:

      #> umount ~/box.com

    Encore plus fort, sous Nautilus, une nouvelle entrée de volume est disponible, un seul click sur l'icone et le lecteur est monté.  Un click sur le petit bouton de démontage, à droite et le lecteur est démonté.

    Nautilus-drive-box-com
    Note:

    Si comme moi, vous êtes confrontés à l'impossibilité de monter un volume DAVFS en tant que simple utilisateur (non root) vous devez passer la commande suivante:


      #> sudo chmod u+s /sbin/mount.davfs 

     Merci à launchpad https://bugs.launchpad.net/ubuntu/+source/davfs2/+bug/46995

    facile, non ?

    • Tweet
  • Play! sample blog

    • 19 Jan 2012
    • 0 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    Click here to download:
    play-blog-sample.zip (90 KB)

     

    Play!framework.

    A small sample code

    Install play framework into your prefered path on your account and modify your system path to add the play installation directory:

    http://download.playframework.org/releases/play-1.2.4.zip


    And then, unzip the demo in your prefered path, just "cd" in and then, to run demo :
    #> cd play-blog-sample
    #> play dependencies
    #> play run
    if you want to edit project with eclipse
    #> play eclipsify
    and import the resulting project into a brand new Eclipse workspace.
     

    Note:
    Before running eclipse, don't forget to copy jar files from 
    play-1.2.4/support/eclipse 
    to the eclipse/dropins directory.

    If you want to consult play documentation run this play app as discribed as before, and click on the

    http://localhost:9000/@documentation

    And if you are a tester:
    #> play test
    and click http://localhost:9000/@tests


    Have fun !

    • Tweet
  • Test Driven Development tutorial

    • 22 Dec 2011
    • 1 Response
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    In a next post, I will write a brand new tutorial about the TDD agile method on development process.

    Listingsid_148_0711_rdn_tb_gif
    image from:http://reddevnews.com/articles/2007/11/01/testdriven-development-tdd.aspx

    Stay tuned !

    • Tweet
  • Agile technology to serve project management !

    • 20 Dec 2011
    • 0 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost
    Please, let me show you our new i-BrownPaper, this is the art of our activities now.

    Brown-paper-modified

    Thanks to agile process to perform projects and activities management.

    McG.
    • Tweet
  • X360, RIP...

    • 20 Dec 2011
    • 0 Responses
    •  views
    • Edit
    • Delete
    • Tags
    • Autopost

    While I am trying to rescue my good old console, It did not survive more than 45 minutes to the last heat treatment. Dear Microsoft Console, rest in peace !

    Xbox360-burn-19052011-002_014f000000062995

    illustration from :http://www.xboxgen.fr/noire-surchauffe-playstation-3-80-60-fat-rockstar-games-sony-firmware-actualite-14059.html

    Dear Santa Claus, please, could you bring me a brand new one like in the following pack ?

    Xbox-pack-forza3-crysis2-small

    illustration from : http://www.trouvetaxbox.com/index/bundles/id/9

    • Tweet
  • « Previous 1 2 3 4 5 6 7 8 9 … 15 16 Next »
  • About

    Java/J2EE Expert
    Technical Manager
    Web Standard evangelizer

    120787 Views
  • Archive

    • 2012 (12)
      • May (1)
      • April (7)
      • January (4)
    • 2011 (53)
      • December (5)
      • November (1)
      • September (4)
      • August (4)
      • July (5)
      • June (2)
      • May (11)
      • April (11)
      • March (5)
      • February (3)
      • January (2)
    • 2010 (51)
      • December (2)
      • November (2)
      • October (1)
      • September (3)
      • August (8)
      • July (4)
      • June (15)
      • May (3)
      • April (2)
      • March (5)
      • February (5)
      • January (1)
    • 2009 (29)
      • December (1)
      • November (5)
      • October (6)
      • August (1)
      • July (4)
      • June (2)
      • May (1)
      • April (4)
      • March (2)
      • February (1)
      • January (2)
    • 2008 (39)
      • December (1)
      • November (5)
      • October (8)
      • September (8)
      • August (8)
      • July (9)

    Get Updates

    Follow this Space »
    You're following this Space (Edit)
    You're a contributor here (Edit)
    This is your Space (Edit)
    Follow by email »
    Get the latest updates in your email box automatically.
    Loading...
    Subscribe via RSS
    FlickrPicasametaweblog