AirV's Blog

Just another blog

Tips MacOs

Lancement d’applications au démarrage

  • Préférences Système => Comptes => Nom du Compte => Onglet Ouverture

Synchronisation des calendriers Google avec Ical

  • Via les préférences, créer un compte sous Ical de type automatique avec l’adresse mail de google

Synchronisation des contacts Google avec le carnet d’adresse

  • Via les préférences, synchroniser avec google

Caractères spéciaux

  • Pipe : Alt + Maj + L
  • Suppression : Pomme + del
  • AntiSlash : Alt + Maj + /
  • Tilde : Alt + n
  • Préférence : Pomme + ,
  • Clic droit :
    • méthode 1 : Utiliser une souris
    • méthode 2 : CTRL-Clic : Il suffit de maintenir la touche CTRL en même temps que l’on appuie sur le bouton du trackpad ou de la souris
    • méthode 3 : 2 doigts sur le Trackpad : Il faut activer la fonction dans pomme/préférence système/clavier souris/ trackpad. Pour faire un clic droit il suffit dès lors d’avoir 2 doigts posés sur le trackpad (un peu espacés quand même) et de cliquer.

Connaitre la date de fabrication de la machine

Et encore plus

NTFS sous MacOs

Sous Mac OS X Leopard, il est possible de lire et écrire sur des partitions NTFS grâce au logiciel NTFS-3G.

  • Testé et approuvé (2011/02/16) avec NTFS-3G

Settings for NTFS-3G can be changed using the NTFS-3G preference pane. To access the preference pane, start your ‘System Preferences’ application ( Menu -> System preferences…) and click the NTFS-3G icon.

Sur Snow Leopard 64 bit, il a fallu trouver un autre moyen pour lire et écrire les partition NTFS. En effet, le noyau 64 bit n’est pas supporté par NTFS-3G

Si la lecture des partitions NTFS est possible par défaut sur Snow Leopard, ce n’est pas le cas pour l’écriture. Certains ont cependant noté qu’il était possible d’activer le support de l’écriture via quelques lignes de commande dans le terminal et sans ajouter le moindre driver :

  • désinstallez Paragon NTFS ou NTFS-3g si l’un des deux est installé sur votre machine
  • lancez Terminal.app (dans le dossier utilitaires)
  • tapez « diskutil info /Volumes/Nom_du_volume » et copiez l’UUID du volume (une suite de chiffres)
  • sauvegardez /etc/fstab s’il est présent (il ne devrait pas l’être sur une installation par défaut)
  • tapez « sudo nano /etc/fstab »
  • tapez « UUID=collez_votre_UUID_ici none ntfs rw » ou « LABEL=Nom_du_volume none ntfs rw » (si vous n’avez pas l’UUID de votre disque).
  • reproduisez l’opération pour toutes vos partitions NTFS
  • enregistrez le fichier (control-x puis y) et redémarrez votre Mac

NtfsMounter est un petit programme qui rempli parfaitement cette tâche d’une manière plus « user friendly ».

Paragon NTFS (non gratuit) dans sa version 8.0 supporte le mode 64 bit de Snow Leopard.

Migration des bases de données WordPress

From http://www.tipstechtricks.com

Change Siteurl & Homeurl

WordPress stores the absolute path of the site URL and home URL in the database. Therefore, if you transfer your WordPress site from the localhost to your server, your site will not load online. This is because the absolute path URL is still pointing to your localhost. You will need to change the site URL and the home URL in order for the site to work.
Solution:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com','http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

Change GUID

After you have migrated your blog from the localhost to your server or from another domain to a new domain, you will need to fix the URLs for the GUID field in wp_posts table. This is crucial because GUID is used to translate your post or page slug to the correct article absolute path if it is entered wrongly.
Solution:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change URL in Content

WordPress uses absolute path in the URL link instead of a relative path in the URL link when storing them in the database. Within the content of each post record, it stores all the old URLs referencing the old source. Therefore you will need to change all these URLs to the new domain location.
Solution:
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change Image Path Only

If you decide to use Amazon CloudFront as your Content Delivery Network (CDN) to offload the delivery of images from your server. After your have created your CNAME record, you can use the query below to change all the image paths in WordPress to load all your images from Amazon CloudFront.
Solution:
UPDATE wp_posts SET post_content = REPLACE (post_content, 'src="http://www.oldsiteurl.com','src="http://yourcdn.newsiteurl.com');
You will also need to update the GUID for Image Attachment with the following query:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com','http://yourcdn.newsiteurl.com') WHERE post_type = 'attachment';

Update Post Meta

Updating Post Meta works almost the same way as updating the URL in post content. If you have stored extra URL data for each post, you can use the follow query to change all of them.
Solution:
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value,'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change Default « Admin » Username

Every default WordPress installation will create an account with a default Admin username. This is wide spread knowledge, everyone who uses WordPress knows this. However, this can be a security issue because a hacker can brutal force your WordPress admin panel. If you can change your default “Admin” username, you will give your WordPress admin panel additional security.
Solution:
UPDATE wp_users SET user_login = 'Your New Username' WHERE user_login = 'Admin';

Reset Password

Ever wanted to reset your password in WordPress, but cannot seem to use the reset password section whatever the reason?
Solution:
UPDATE wp_users SET user_pass = MD5( 'new_password' ) WHERE user_login = 'your-username';

Assign all articles by Author B to Author A

If you want to transfer the articles under Author B to merge with those under Author A, it will be very time consuming if you do it article by article. With the following SQL query, you can easily go through all the records and assign articles by Author B to go under Author A.
You will first need to obtain the author ID of both authors by going to your Author & User page in your WordPress admin panel. Click on the author’s name to view their profile. At the address bar, look for « user_id« . That is the author ID information we require.
Solution:
UPDATE wp_posts SET post_author = 'new-author-id' WHERE post_author = 'old-author-id';

Delete Revision

When you are editing an article in WordPress, there will be many revision copies being saved. This is a waste of resources because excessive revision records can increase the burden of the database. Over time, when you have thousands of entries, your database will have grown significantly. This will increase loop iterations, data retrieval and will affect the page loading time.
Solution:
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
Source from: Lester chan
Note: Bear in mind that all revisions from each post will be deleted, including all of its meta data.

Delete Post Meta

Installing or removing plugins is a very common task for WordPress. Some of the plugins make use of the post meta to store data pertaining to the plugin. After you have removed the plugin, those data are still left inside the post_meta table, which will no longer be needed. Run the following query to clean up the unused post meta value. This will help to speed up and reduce the size of your database.
Solution:
DELETE FROM wp_postmeta WHERE meta_key = 'your-meta-key';

Export all Comment Emails with no Duplicate

Over a period of time, your blog will have received many comments. These comments will include the email addresses left by the commenter. You can retrieve all these emails for your mailing list without any duplicate.
Solution:
SELECT DISTINCT comment_author_email FROM wp_comments;
Once you have the result, under Query results operations, select export to export all the emails in phpMyAdmin.

Delete all Pingback

Popular articles receive plenty of pingback. When this happens, the size of your database increases. In order to reduce size of the database, you can try removing all the pingbacks.
Solution:
DELETE FROM wp_comments WHERE comment_type = 'pingback';

Delete all Spam Comments

If you have plenty of spam comments, going through each page to delete spam can be tedious and frustrating. With the following SQL query, even if you have to face deleting 500 over spam comments, it will be a breeze.
Solution:
DELETE FROM wp_comments WHERE comment_approved = 'spam';
  • 0 = Comment Awaiting Moderation
  • 1 = Approved Comment
  • spam = Comment marked as Spam

Identify Unused Tags

In a WordPress database, if you run a query to delete old posts manually from MySQL, the old tags will remain and appear in your tag cloud/listing. This query allows you to identify the unused tags.
Solution:
SELECT * From wp_terms wt
INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id WHERE wtt.taxonomy='post_tag' ANDwtt.count=0;

Monter des périphériques USB dans VirtualBox sous Ubuntu

From How to Geek

Mounting a USB device inside a virtual machine is often a tool that you cannot go without. If you are using Virtualbox in Ubuntu however, you need to take a few extra steps to make it work.

Install Virtualbox

The first thing you need to do is install Virtualbox from Oracle’s website. It is different than Virtualbox OSE which is included in the Ubuntu repositories because the Virtualbox from Oracle includes proprietary software which allows you to mount USB devices inside you VM among other things. If you already have Virtualbox OSE installed from the Ubuntu repositories, uninstall it before installing the .deb file from Oracle’s website.

Note: Any VMs you made with Virtualbox OSE will still work with the standard version of Virtualbox. Uninstall Virtualbox OSE before installing virtualbox from Oracle.

Set up Your Virtual Machine

Install your virtual machine and once the installation is complete install the Virtualbox guest additions into the guest OS from the devices menu.

Turn the virtual machine off and go to the settings for the VM. Click on USB on the left and check the top two boxes in the window shown.

Along the right hand side there will be a few icons to set up USB filters. These filters are where you can tell Virtualbox what USB devices you want to have available to your guest OS. Plug in your USB device and click on the second icon to view available USB devices that can be mounted into the guest OS.

Select any devices you would like to mount in the guest OS and then close out of the settings window.

Set Up Your User Account

The next thing you need to do is add your user to the vboxusers group on your system. Navigate to the System -> Administration -> Users and Groups option and click on manage groups on the left side.

Scroll down in the group settings and highlight the vboxusers group and then click properties on the right.

In most cases you probably will only have one user so check the box to include your user in the group; put in your admin password when prompted, and then restart your computer.

Mount Your USB Device

Once your computer restarts, log in and start your virtual machine. In the devices menu of the VM, select the USB device you want to mount.

Your device should show up automatically in the VM and you can use it the same way you would be able to on the host operating system.

Virtualbox Website

Nouvelle interface Unity sous Ubuntu 10.10

From How to Geek

Workspace 1_007

Ready to breathe new life into your netbook? Ubuntu Netbook Edition 10.10 includes an innovative new look and feel and support for most netbooks without any extra configuration. Let’s take a look at the newest features.

New Unity Interface

Linux has been a stable and useful OS for many years, but has often been lacking in innovative UI touches. Ubuntu has always been focused at making Linux more consistent and easy to use, and we found their netbook edition to be very polished and easy to use inour previous look at Ubuntu Netbook Remix 10.04.

The latest 10.10 netbook edition takes this even further. When you first start Ubuntu 10.10, you’ll see a dock-style bar on the left with common applications, as well as the standard Ubuntu bar across the top.

image

Simply click one of the app icons in the launcher to start it. You’ll see a caret indicator on the left side of the icons of apps that are currently running, as well as a caret on the right if the app is the active program.

image

If you’ve got several windows open from an application, you’ll see each of the windows in an exposé style overview. Select the window you want, and you’ll be quickly back to work.

Right-click on an icon to quit the program or remove it from the launcher.

image

If you’d like to rearrange the launcher apps, simply click and hold then drag to the position you want. Alternately, you can drag an icon off the launcher to remove it.

image

As your launcher fills up, the icons at the top and bottom will fold up accordion style. Then they’ll return to normal size when you mouse over the launcher. You can scroll or drag the icons up and down to see those that are lower down or higher up on the bar. Amazingly, when you mouse-over the icons, it expands starting at the one you hovered over, so often you’ll get the app you want without having to scroll through icons. This works really nicely for organizing a large number of apps on a small netbook display, and would be very nice on a tablet interface.

image

Quickly access your favorite apps and files

If you click the Ubuntu button, you’ll be greeted with quick-launch icons for popular Ubuntu tasks and destinations, such as Internet and More Apps. These large, high-quality icons could easily be mistaken for iOS on an iPad.

image

The Ubuntu launcher page includes a search box at the top. Enter the name of any application or file on your netbook to quickly find it. It’ll even show results for apps from the Ubuntu Software Center that you may not have installed yet.

image

The new Files and Folders link works similarly, showing recent files and favorite folders with a search box on the top. This makes it easy to browse to your profile folders and the files you’re most likely to need with just a few clicks.

image

If you find you need more direct access to your file system, click the folder icon to open that folder in Nautilus.

image

Other Enhancements

Ubuntu Netbook Edition now includes an easy to use multiple desktop option withWorkspaces. Click the purple Workspaces icon to quickly switch between running applications in different desktops. Since most application run full screen by default on netbooks, you can slick the app’s screenshot directly in the workspace to switch to that app.

image

Additionally, all programs now put their file menu in the top Ubuntu bar on netbooks. Even smaller applications such as calculator will have their File menu options on the top, similar to OS X. The menus all look beautiful thanks to the new Ubuntu fonts.

image

To top it off, this version includes most of the enhancements you’ll find in the standard desktop edition of Ubuntu 10.10, including the updated Software Center and integrated Rhythmbox in the volume control.

image

Ubuntu Netbook Edition 10.10 ran great on our relatively new netbook, a Samsung N150, and recognized the wifi, touchpad, and webcam without any extra configuration. We were very impressed with the performance, and the new launcher made it fun and easy to use. With the new app center, the dock-like launcher, and integrated file menus, Ubuntu Netbook Edition feels more like OS X than ever. It’s very polished, so give it a try and see if linux is finally ready for you.

Download Ubuntu Netbook Edition

Minimal Desktop on Unbuntu 10.10

Minimal Desktop for Ubuntu 10.10
Minimal Desktop for Ubuntu is a shell script designed to be run following the installation of the Ubuntu command-line system available on the Alternate and Netboot install CDs. It builds a stripped-down graphical environment, allowing the user to select which windowing environment, Web browser, IM client, office suite, and media player they want before they are installed.

Changes: Updated for Maverick. A Fluxbox/XDM option has been added. The architecture detection for libdvdcss has been fixed. A refresh of the Opera GPG key to rc.local has been done to fix its update bug. The Konqueror option has been replaced with Rekonq (as it is the new default browser in Kubuntu). Miscellaneous spelling fixes.

8f5b9eca201f9b531ede1c9727f13386_thumb

Mot de passe Macintosh

From How to Geek

How to Reset Your Forgotten Mac OS X Password

It happens to everyone at some point—you create a new password and don’t remember to save it somewhere, and then before you know it you’ve forgotten what it was. Here’s how to reset the password on your Mac OS X computer.

If you’ve got a Windows PC and you want to reset your password, you can do so easily with the Ubuntu Live CD or the System Rescue CD in just a couple of minutes. Or you could always crack your password if you wanted.

Luckily for us, OS X has some very simple tricks that can reset a forgotten password without going to a lot of trouble.

Method One: Using the Install Disk

The first method we will look at is the OS X Installation Disk, so grab yours and put it into the drive. Once you have booted off the disk you will need to choose your language, and then OS X will prepare the installation environment.

Then you will choose the Utilities menu and choose Reset Password.

Now you need to choose the volume with the account you need to change the password for, choose the account from the drop down, and generate your new password and password hint if you wish to use one.

Note: You may want to reset the ACLs while you are here since you have changed your password. Once you are done, you can save and restart the computer.

Now you can login to your OS X computer with your newly made password.

Method Two: Tricking OS X Into Running the First Boot

The other, and possibly easier way to get around a forgotten password requires booting into Single User Mode and removing a file that tells OS X that the first boot setup has run.

To boot into Single User Mode, you’ll need to reboot the computer while pressing and holding the Command and S keys after you hear the startup gong.

Once you have booted into Single User Mode you will need to mount the volume you need to get into. Most of the time this will just be your boot disk and can be mounted as “/”. This command will mount that for you:

sudo mount -uw /

Next we need to remove the file that tells OS X that its already done the setup:

rm -rf /var/db/.AppleSetupDone

Now we need to reboot using the very logical reboot command.

reboot

Once we boot back up it will be just like the first time you boot after install and you will see the Welcome screen, and just click through the first two screens.

When you reach the screen that asks if you already own a Mac, make sure to choose “Do not transfer my information now” since we’re not doing any migrating of data.

Once you reach the “Enter Your Apple ID” screen, you can press the Command and Q keys at the same time to get past the rest of the prompts. Click Skip when asked.

Now you will create a new Administrator account. You can choose to name it something you wish to keep or anything since you just need this account to get into the OS and to System Preferences.

Click through the next screens until you reach the Thank You screen, and we’re finally done with that part of the process. Click Go and you’ll be brought into the new account.

Once the new account has loaded you can now go to your System Preferences. We will want the Accounts pane.

Now select the account with the password you want to reset and click Reset Password…

Choose your new password, and password hint if you desire, and click Reset Password.

You can now logout and login to the account with the new password.

Mot de passe Windows

Fonctionnement des partages

  • Activer les mots de passe
    • il faut le bon login / mdp
  • Désactiver les mots de passe
    • si le comtpe n’existe pas ok
    • si le compte existe il faut le bon mot de passe

Astuce

Sous windows seven il est possible d’ajouter un compte administrateur sur une machine (voir le post suivant pour plus de détails)

Utilisez un LiveCD afin d’accéder à votre partition système NTFS (C: depuis Windows).

  • Renommez le fichier Utilman.exe en Utilman.exe.bak situé dans le répetoire C:WindowsSystem32
  • Faites une copie du fichier cmd.exe et renommez le Utilman.exe (tout se passe dans le même répertoire).

Nous venons de remplacer l’exécutable de gestion des options d’ergonomie (Utilman.exe) par l’éxecutable de l’invite de commande (cmd.exe)

Redémarrez votre PC normalement sous Windows (Vista ou Seven).

Créer le nouveau compte admin en ligne de commande en cliquant sur l’icone de gauche

  • net user root /add
  • net user root toto
  • net local group administrateurs root /add

Logiciel

Voir le post suivant pour plus de détails.

Ophcrack is a free Windows password cracker based on rainbow tables. It is a very efficient implementation of rainbow tables done by the inventors of the method. It comes with a Graphical User Interface and runs on multiple platforms.

Testé le 04/02/2011 => ok

Features:

  • Runs on Windows, Linux/Unix, Mac OS X, …
  • Cracks LM and NTLM hashes.
  • Free tables available for Windows XP and Vista.
  • Brute-force module for simple passwords.
  • Audit mode and CSV export.
  • Real-time graphs to analyze the passwords.
  • LiveCD available to simplify the cracking.
  • Loads hashes from encrypted SAM recovered from a Windows partition, Vista included.
  • Free and open source software (GPL).