Relakks, Hadopi, take it easyyyyy

Voila une des solution au lois anti internet qui ressurgissent chaques années à l’assemblé:

https://www.relakks.com/

C’est un service VPN payant hébergé en Suède

relakks.png
S’inscrire, payer (5€ pour 1 mois)

Installer le client VPN:

sudo apt-get install network-manager-pptp

Click sur l’icone de la connexion réseau=> Connexion VPN=>Configure VPN

Ajouter=> PPTP protocol=>Crréer
Nom de connexion: Relakks

Passerelle: pptp.relakks.com

Nom d’utilisateur et mot de passe: celui fourni lors de l’inscription

Avancé=> Selectionner: Utiliser encryption Point à Point (MPPE)

Puis enfin pour se connecter:

Click sur connexion réseau=> Connexion VPN=>Relakks

vpn.png

Voilà!!!, rien d’autre à faire

On checke l’ip:

ip.png

Puis un petit torrent pour voir le débit max, test avec VPN Relakks:
268.png

Une bonne moyenne à 250ko/s

Testons maintenant sans VPN Relakks:

856.png

un bon 850ko/s sur un torrent légal, connexion Free dégoupé.

Conclusion:

La connexion est stable et constante, certe limité à quelques centaines de ko/s, mais largement suffisant.

Pour 5€/mois ou 45€/ans, cela rend le projet d’Albanel quaduc avec sa haute hautorité coutant 65M€ aux contribuables.

Un mythe s’effondre

Quand j’ai un doute sur l’orthographe, je fais une recherche Google avec les 2 orthographes sur lesquelles j’hésite.

  • Recherche avec : “acceuil” -> 376 000 000 résultats
  • Recherche avec : “accueil” -> 372 000 000 résultats

Sans commentaire…

Total licencie, et alors ?

Total annonce un licenciement de quelques centaines de personnes.
“Tolé” général, nous avons de chaque côté :

  • politiques (tous bords confondus), medias (publics et privés) et syndicalistes (de tous bords) qui argumentent que :

“Total ayant engrangé 14 milliards de bénéfices l’an dernier, il n’est pas question de parler de licenciement”

  • représentants de Total qui argumentent que :

“La consommation de pétrole ayant baissé, il n’est pas question de raffiner du pétrole pour le plaisir, les licenciements (non renouvellement de poste après départ à la retraite ou reclassement) auront lieu”

Quel est l’argument le plus recevable ? Evidemment Total, et ce n’est que le début de la baisse de la production de pétrole (alias de la consommation) et de la refonte de la société. En route pour la société v2.0.

Reset default theme in drupal without admin / with mysql

You will find usefull information about this in this article: http://drupal.org/node/200774

Situation:
Either you have installed or modified a theme that just breaks everything, or you’ve deleted the current theme without disabling it first.

As you’ve now learned, you should have switched out of the theme via administration before destroying it, because you are left with nothing or almost nothing as a UI to work with now.

But we can probably recover.

If you see some content but no navigation blocks
We can fix up the themes by going directly to the required pages.

  1. You’ll have to be logged on, so enter http://example.com/?q=user in the browser. Logon as normal. (use your own Drupal path of course)
  2. Enter http://example.com/?q=admin/build/themes (D5) or http://example.com/?q=admin/themes (D4) to see a version of the themes page. Select a valid theme (eg BlueMarine) and things should be in a state where you can continue.

If you see no content at all, maybe garbage or a totally blank screen or the above doesn’t work…
We need to do surgery on the database.
It’s easier if you choose a theme name that you know used to work, eg ‘garland’ or ‘bluemarine’ for D4.

Either on the commandline, or via an administration interface (eg PHPMyAdmin) enter the following query

UPDATE system SET status=1 WHERE name = 'garland';

Then either:

UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE cache;

Note that ‘s:7’ refers to the length of the following string. Modify as needed. This is database surgery, tricky stuff.
OR
If you are using per-user themes, and you’ve just messed it up for yourself as admin, try

UPDATE users SET theme='garland' WHERE uid = '1';

Be careful, as getting either of those lines wrong can mess things up just as badly.

If you see some of the theme, but no navigation blocks, you may be able to proceed as in the first case, described above.

That didn’t work
It’s hard to guess how badly your system is damaged at this point. Did you delete the phptemplate directory?
Try re-uploading the entire contents of the /themes directory from a clean distribution of the exact same version of Drupal.

df not updated

If you rm some big file and you don’t recover your space disk (df shows your device always full), you can check if there is some process using your deleted file with :

ls -ld /proc/*/fd/* 2>&1 | fgrep ‘(deleted)’

You simply have to kill these processes which are still using your file.

FCKEditor + AjaxFileManager

Default file browser embedded with FCKEditor is very light.

I prefer AjaxFileManager, a rich browser / uploader / manager for your files, most intuitive.

But, in order to include it with your FCKEditor installation, you need to tweak some files.

When following directives here, step by step : http://www.phpletter.com/Our-Projects/Fckeditor-Ajax-File-Manager-Project/ , you will have to :

  • put  all the “ajaxfilemanager” directory in “filemanager/browser” directory of fckeditor
  • edit fckconfig.js to get something like that :
    • FCKConfig.LinkBrowser = true ;
      //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Connector=’ + encodeURIComponent( FCKConfig.BasePath + ‘filemanager/connectors/’ + _FileBrowserLanguage + ‘/connector.’ + _FileBrowserExtension ) ;
      //FCKConfig.LinkBrowserWindowWidth    = FCKConfig.ScreenWidth * 0.7 ;        // 70%
      //FCKConfig.LinkBrowserWindowHeight    = FCKConfig.ScreenHeight * 0.7 ;    // 70%
      FCKConfig.LinkBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/ajaxfilemanager/ajaxfilemanager.php’ ;
      FCKConfig.LinkBrowserWindowWidth    = 782 ;
      FCKConfig.LinkBrowserWindowHeight    = 440 ;FCKConfig.ImageBrowser = true ;
      //FCKConfig.ImageBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Type=Image&Connector=’ + encodeURIComponent( FCKConfig.BasePath + ‘filemanager/connectors/’ + _FileBrowserLanguage + ‘/connector.’ + _FileBrowserExtension ) ;
      //FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;    // 70% ;
      //FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;    // 70% ;
      FCKConfig.ImageBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/ajaxfilemanager/ajaxfilemanager.php’ ;
      FCKConfig.ImageBrowserWindowWidth  = 782 ;
      FCKConfig.ImageBrowserWindowHeight = 440 ;

      FCKConfig.FlashBrowser = true ;
      //FCKConfig.FlashBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/default/browser.html?Type=Flash&Connector=’ + encodeURIComponent( FCKConfig.BasePath + ‘filemanager/connectors/’ + _FileBrowserLanguage + ‘/connector.’ + _FileBrowserExtension ) ;
      //FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;    //70% ;
      //FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;    //70% ;
      FCKConfig.FlashBrowserURL = FCKConfig.BasePath + ‘filemanager/browser/ajaxfilemanager/ajaxfilemanager.php’ ;
      FCKConfig.FlashBrowserWindowWidth  = 782 ;
      FCKConfig.FlashBrowserWindowHeight = 440 ;

      //FCKConfig.LinkUpload = true ;
      FCKConfig.LinkUpload = false ;
      FCKConfig.LinkUploadURL = FCKConfig.BasePath + ‘filemanager/connectors/’ + _QuickUploadLanguage + ‘/upload.’ + _QuickUploadExtension ;
      FCKConfig.LinkUploadAllowedExtensions    = “.(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$” ;            // empty for all
      FCKConfig.LinkUploadDeniedExtensions    = “” ;    // empty for no one

      //FCKConfig.ImageUpload = true ;
      FCKConfig.ImageUpload = false ;
      FCKConfig.ImageUploadURL = FCKConfig.BasePath + ‘filemanager/connectors/’ + _QuickUploadLanguage + ‘/upload.’ + _QuickUploadExtension + ‘?Type=Image’ ;
      FCKConfig.ImageUploadAllowedExtensions    = “.(jpg|gif|jpeg|png|bmp)$” ;        // empty for all
      FCKConfig.ImageUploadDeniedExtensions    = “” ;                            // empty for no one

      //FCKConfig.FlashUpload = true ;
      FCKConfig.FlashUpload = false ;
      FCKConfig.FlashUploadURL = FCKConfig.BasePath + ‘filemanager/connectors/’ + _QuickUploadLanguage + ‘/upload.’ + _QuickUploadExtension + ‘?Type=Flash’ ;
      FCKConfig.FlashUploadAllowedExtensions    = “.(swf|flv)$” ;        // empty for all
      FCKConfig.FlashUploadDeniedExtensions    = “” ;

  • edit ‘config.base.php’ in ajaxfilemanager/inc directory and change these lines :
    • define(‘CONFIG_SYS_DEFAULT_PATH’, ‘../../../../../../uploads/images/fckeditor/’); //accept relative path only
      define(‘CONFIG_SYS_ROOT_PATH’, ‘../../../../../../uploads/images/fckeditor/’);    //accept relative path only
    • //define(‘CONFIG_EDITOR_NAME’, (CONFIG_QUERY_STRING_ENABLE && !empty($_GET[‘editor’])?secureFileName($_GET[‘editor’]):’stand_alone’));
      define(‘CONFIG_EDITOR_NAME’, (CONFIG_QUERY_STRING_ENABLE && !empty($_GET[‘editor’])?secureFileName($_GET[‘editor’]):’fckeditor’));
  • patch ajaxfilemanager/jscripts/for_fckeditor.js with this new function (comment original ‘selectFile’ function) :
    • function selectFile(absoluteurl)
      {
      //var relative=absoluteurl.split(document.domain);
      var relative = absoluteurl.split(‘/uploads/’);
      var url =  ‘/uploads/’ + relative[1];if (url != ”)
      {
      window.opener.SetUrl(url) ;
      window.close() ;
      }else
      {
      alert(noFileSelected);
      }
      }

Hope this helps !

Firefox 3.1

Enfin… depuis le temps que j’attends celle-là (quand je vois que y en a qui génère des objets flash pour chaque h1 ou h2 pour avoir une font un peu originale…) :

[style type=”text/css” media=”screen, print”]
@font-face {
font-family: “Bitstream Vera Serif Bold”;
src: url(“http://yourserver.com/VeraSeBd.ttf”);
}

body { font-family: “Bitstream Vera Serif Bold”, serif }

Sans parler de tout le reste : offline caching, xhr cross site allowed, svg filters on html,  and  natively supported…

Un aperçu dans ce PDF.

Vu la merdasse qu’est IE6 à l’heure actuelle et que tout le monde se fait chier à encore supporter, le prochain client aura droit à un supplément financier pour rendre son site internet compatible IE6. Y en a marre de tirer vers le bas tout le web à cause d’un navigateur complétement obsolète et buggué jusqu’à l’os.

Symfony ProjectConfiguration.class.php lib path

In need to tweak config/ProjectConfiguration.class.php file in order to import a project to a sandbox symfony workspace.

The path to sfCoreAutoload was never good between web and cli symfony.

Here is the trick :

if (!@include_once ‘./lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php’) {
include_once ‘../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php’;
}
sfCoreAutoload::register();