Friday, December 18, 2009

unison on win

first get gtk+ runtime libs.

then get unison.

tested on winxp32 and win7x64.

EDIT: latest redist package: http://www.microsoft.com/downloads/en/ResultsForProduct.aspx?productID=23947d52-b2bc-4e88-8c51-e81dc2905b0d&stype=n_a2z

Monday, December 7, 2009

mp

For Win7x64: foobar2000 http://www.foobar2000.org
For Linux: mplayer, for a lack of anything better (rythmbox and the one from KDE never impressed me)
For both: vlc for video

Saturday, December 5, 2009

openvpn

great doc on how to configure a bridged openvpn server on ubuntu: https://help.ubuntu.com/community/OpenVPN

pmp

Got a Cowon D2+ 16GB. It seems picky about mp3 tags and "bad" tags make it show up Unknown for everything under the Music Library even if only some of them are bad. Sometimes though, like 1 in 10 tries, it showed most of them correctly. This is a real pita and I though the thing was broken at first.

Using foobar2000 or mp3tag we can retag mp3 files correctly. Using only APEv2 seems fine.

I did not have any problem with flac files.

I should soon upload some ogg files in it and see if there's any problem.

audio ripz and burnz

For Win7x64;
Exact Audio Copy.
Configure to detect drive feature, offset.
Alt-G for freedb download.
F4 to detect pretrack gaps.
Make cue sheet with one FLAC file for entire album (action -> cue sheet... -> compressed)
Verify AccurateRip results.

Open cue sheet file with Foobar2000.
Right-click Convert... to convert to multiple ogg files. (how to normalize?)

Now we can use cue/flac to play at home or make copies and ogg to put on portable media player.

Sadly, foobar2000 doesn't seem to have a decent writer component (it lacks CD-TEXT support). To make gapless audio copies of cue/flac, use maybe burrrn.net or cdrtools. Infrarecorder gives errors about last track length (?). cdrtfe is a nice frontend and the setup file includes common decoders (but can't make Data DVDs AFAIK).

EAC does not produce a correct cue sheet file when using compressed image (says type is WAVE). Foobar2000 doesn't seem to mind but ironically, EAC's write feature can't deal with it.

msvcp win7

Apparemment que ce certain DLL est souvent répandu par l'entremise de différents logiciels, car il n'est pas installé avec des packages de runtime ou whatever. Ça pas l'air clair à savoir si les gens qui distribuent leurs programmes compilés doivent inclure ou pas cette bibliothèque.

On peut avoir besoin de différentes versions de cette dernière, mais j'ai trouvé les fichiers pour 6.0, 7.0, 7.1, 8.0 et 9.0 en faisant une recherche sur mon disque entier et sur un backup de XP.

On dirait que les programmes en ayant besoin sont capricieux et le veulent dans leur root folder. Peut-être avec regsvr32?

Friday, November 13, 2009

vi

Ça vaut la peine d'apprendre à utiliser vim.

Et si c'est rendu vraiment amusant, on peut même le faire sous Firefox:

http://www.vimperator.org/vimperator 

La souris est souvent plus rapide pour cliquer sur les liens voulus versus la numération que nous offre la touche "f" dans vimperator, mais le tab management est bien plus rapide.

Si on s'ennuie tout de même de l'address bar et des menus, on peut faire:

:set guioptions=mT

Il faut écrire cette dernière ligne dans ~/.vimperatorrc pour s'assurer de sauvegarder la configuration.

Je vais peut-être essayer muttator bientôt, le plugin pour Thunderbird.

Update: voir ~/.vimrc pour config.

hd

http://www.youtube.com/watch?v=Q6obiA47pgk
http://www.youtube.com/watch?v=M9GUgCQ7eLM

idontthinkso

Just testing image embedding... *cough*.

 

firefox plugins/addons

flashblock 433 blocks flash until click
bugmenot 6349 registration bypass
torrentflux add 7876
dictionnaire français 64759
vimperator 4891 vim-like shortcuts
web of trust 3456 cockrings de couleurs selon la fiabilité des links
delicious 3615 intégration de bookmarks
MD5 Reborned Hasher 12335
chatzilla 16 irc client
fireftp 684 ftp client
firebug 1843 web dev tools
DownloadThemAll! 201
youtube downloader 10137
Pearl Crescent 10367 page saver
Greasemonkey 748 customize/script web pages using JS
Session Manager
Soundcloud downloader 

Last update: 2012-02-13

Tuesday, October 27, 2009

cmdhere on win7

Shift + right-click shows a context menu with additional entries such as Open command window here.

To add Open powershell here with and without elevated privileges:
  1. Windows Registry Editor Version 5.00
  2. [HKEY_CLASSES_ROOT\Directory\shell\ps]
  3. @="Open powershell here"
  4. [HKEY_CLASSES_ROOT\Directory\shell\ps\command]
  5. @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
  6. [HKEY_CLASSES_ROOT\Directory\shell\Runas]
  7. @="Open admin powershell here"
  8. [HKEY_CLASSES_ROOT\Directory\shell\Runas\Command]
  9. @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
  10. [HKEY_CLASSES_ROOT\Drive\shell\ps]
  11. @="Open powershell here"
  12. [HKEY_CLASSES_ROOT\Drive\shell\ps\command]
  13. @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
  14. [HKEY_CLASSES_ROOT\Drive\shell\runas]
  15. @="Open powershell admin here"
  16. [HKEY_CLASSES_ROOT\Drive\shell\runas\command]
  17. @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
Keys having runas in their names are the ones that will trigger elevated privileges. So yes, it seems we can only map one elevated command per HKEY_CLASSES_ROOT key...

run as admin on win7

win+r
Type command
ctrl-shift-enter
alt-y

Tuesday, October 20, 2009

overloading SEL_KEYPRESS

Or something like that...

The idea is to get some widget to do not only what it's supposed to, but also something else. For example, I would really want to hear the buzzing sound of a fly whenever I press Ctrl-z in some FXText.
  1. require 'fox16'
  2. require 'fox16/responder'
  3. include Fox

  4. class BuzzingText < FXText

  5.   include Responder

  6.   def initialize p
  7.     super p
  8.     FXMAPFUNC(SEL_KEYPRESS, 0, :onKeyPress)
  9.   end

  10.   def onKeyPress sender, sel, event
  11.     super sender, sel, event
  12. if (event.state & CONTROLMASK != 0) and (event.code == KEY_z)
  13.       # buzz
  14. end
  15.   end

  16. end

Wednesday, October 14, 2009

Avira AntiVir moins gossant

EDIT (2010-04-08): J'utilise maintenant Avast! et il n'y a aucun popup en utilisant le "gaming mode".

EDIT (2009-10-27): Les fucking popups gossants sont revenus. Je songe sérieusement à désinstaller ce logiciel et me trouver un autre anti-virus.

Je trouvais AVG trop lourd et selon les tests de quelques personnes, AntiVir est plus efficace à trouver les virus. Je me décide donc à l'installer, sous win7.

Horreur, à chaque update (plus d'une fois par jour?), je vois un maudit popup qui m'énarve avec sa version premium payante. Enlevons ça:
  • Right-click sur avnotify.exe dans le répertoire correspondant de "Program Files";
  • Properties;
  • Security tab;
  • Éditer les permissons en cochant "Deny" pour tous les users.

Certains utilisateurs se plaignaient aussi de l'updater qui démarre en mode minimized, apparemment chiant quand on roule une application full-screen. On peut démarrer l'updater en mode invisible, comme suit:
  • Popper l'interface;
  • Administration;
  • Scheduler;
  • Right-click "Daily Update";
  • 3 fois "Next >";
  • Changer à "invisible";
  • Finish.
Ref: http://www.tipsfor.us/2009/03/18/avira-antivir-updates-to-version-9-make-it-more-usable/

Thursday, October 8, 2009

updated editor?

Using blogger as a way to store useful technical information for later consultation seemed a good idea. I wanted some kind of content management for some time now because keeping notes in plain text files is boring and difficult to search through. And I wanted links. I never finished the 2 or 3 different versions of scripts for tagging or grouping this kind of stuff and these blogging software already got it all.

And if anything here can be of use to someone else, then all the better. I also think that comments are a good way to dig deeper into problems if anything needs clarification. It'll sharpen my writing. And maybe I'll have interesting conversations with other people! All this looks promising.

But the supposedly updated editor of this blog seems crap. I have to edit the HTML code to remove curious and annoying "span" and "div" blocks. Although things look nice in the "compose" tab, when I preview (or post), these blocks put blank spaces on the page. The "remove formatting" button does not seem to remove them all.

require 'that'

$LOAD_PATH.unshift(
  File.join(
    File.expand_path(File.dirname(__FILE__)), 'lib'
  )
)

refs: http://blog.8thlight.com/articles/2007/10/08/micahs-general-guidelines-on-ruby-requirehttp://stuff.lilleaas.net/load_path

Wednesday, October 7, 2009

About network security and tunneling

"This paper demonstrates how to encapsulate any TCP-based protocol (SMTP, POP3, NNTP, telnet...) into HTTP"
Punching holes into firewalls

or "Why firewalls shouldn't be considered a ultimate weapon for network security"
or "Secure TCP-into-HTTP tunnelling guide"

http://sebsauvage.net/punching/

Saturday, October 3, 2009

UAC, and Configuring GVim on Windows 7

With all this new stuff about user access control (UAC), I tend to use Windows much more in the same way that I would use another Unix OS. The default UAC settings let us know each time we must
use admin privileges to do something crazy on the computer.

Using Windows XP, it would be a pain to switch to an admin account everytime we want to do this crazy something. Because of this, I'm logged on admin full time when using XP, and I don't like it. (If anyone knows another way, please tell me, or not because I won't use it anymore). I'm glad this has changed. I think Vista also has this feature, but since it was Vista, I didn't care.

All this to talk about Gvim's startup settings file, located under a system folder (Program Files). Under XP, I changed the settings right in this file. Of course, I would never do that under Ubuntu --- I have this file hidden right in the root of my "home" directory, as it is with pretty much any other software. Under 7, I was quickly reminded that I needed admin privileges to change it. "Good lord," I thought to myself, "Not only Windows became more multi-user friendly, it even tells me to behave well!". Good. Put your config files at home, you bastards.

Anyways, to change startup settings, I copied _vimrc from vim's folder into my home directory. To set font to "Lucida Console", height 12, width 6.5:
  1. set guifont=Lucida_Console:h12:w6.5
Backup and swap files are annoying:
  1. set nobackup nowritebackup noswapfile
Also,
  1. syntax on
  2. colorscheme darkblue
Doc: http://www.vim.org/htmldoc/options.html

Wednesday, September 30, 2009

posture @work

Travailler dans un entrepôt avec des "lifts" et des "palettes" et des caisses peut être dangeureux, sûrement plus qu'un travail de bureau. À moins de pogner le syndrome du tunnel de la carpe, ou de quoi du genre.

Bref, attention à la posture au bureau. http://www.tifaq.org/

Tuesday, September 29, 2009

GVim on Windows 7 x64

EDIT (2009-10-27): A way better solution is to use the x64 package of gVim from http://code.google.com/p/vim-win3264/. I say it's way better because it adds Diff with vim, something I use really often. There is surely a way to add this one to the context menu using regedit, but I didn't search for it.

After installing GVim on Windows 7 x64, we don't get the useful "edit with vim" in the context menu.

Hack with registry:
  1. Windows Registry Editor Version 5.00
  2. [HKEY_CLASSES_ROOT\*\shell\Edit with Vim]
  3. [HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]
  4. @="C:\\Program Files (x86)\\Vim\\vim72\\gvim.exe \"%1\""

Sunday, September 27, 2009

Ordonner l'union ou unir l'ordre?

Disons que nous avons une table "yo" comportant les colonnes "meh" et "mih". Disons aussi que nous voulons avoir le premier et le dernier record de cette table, ordonné par "meh".

Séparément, en sqlite3, on aurait
select * from yo order by meh asc limit 1;
pour le premier, et
select * from yo order by meh desc limit 1;
pour le dernier.

Bon, il ne reste plus qu'à faire une union alors:
select * from yo order by meh asc limit 1 union all select * from yo order by meh desc limit 1;
Et bien non. Sur sqlite3, on reçoit l'erreur:
SQL error: ORDER BY clause should come after UNION ALL not before
D'abord, joli manque de ponctuation, mais ensuite, pourquoi cela?, se dit-on. Quand on y pense purement du côté de l'union, il ne fait effectivement aucun sens d'ordonner les éléments des 2 tables dès le début --- on ordonnerait plutôt après l'union. Le problème ici est que je ne veux pas ordonner le résultat de mon union, mais plutôt unir 2 résultats ordonnés. Aussi, on ne saurait dire si le dernier "order by" servirait à ordonner la deuxième table, ou bien à ordonner le résultat de l'union.

Et non, on ne peut pas faire:
(select * from yo order by meh asc limit 1) union all (select * from yo order by meh desc limit  1);
Ça serait trop facile. Si j'ai pensé à mettre ces parenthèses, c'est peut-être parce que je m'obstine à penser que SQL est un langage simple à utiliser...

Un compagnon de travail m'a fait part du blog de Pinal Dave, http://blog.sqlauthority.com où un de ses posts il parle justement de ce problème. La solution rapide de Pinal ressemblait à:
  1. select * from yo where meh in(
  2.   select min(meh) from yo union all
  3.   select max(meh) from yo
  4. );
Je ne trouve pas que c'est très élégant, en plus de peut-être donner plus de 2 lignes de résultats si les valeurs de "meh" ne sont pas distinctes.

Je suis déjà nostalgique envers ma solution avec des parenthèses, et je vois un commentaire de Dave Arthur au post de Pinal utilisant cette solution, mais d'un moyen correct, soit:
  1. select a.* from (
  2.   select * from yo order by meh asc limit 1
  3. ) a
  4. union all
  5. select b.* from (
  6.   select * from yo order by meh desc limit 1
  7. ) b
C'est la joie. Je trouve cela complètement stupide et redondant, mais ça colle déjà mieux avec l'idée initiale. De plus, on peut facilement changer le nombre de lignes des 2 queries, séparément.

Saturday, September 26, 2009

Langue

Il va sûrement y avoir des posts en anglais, ou du moins un abus de ma part de termes anglais dans mes phrases.

Probablement des sacres aussi.

Friday, September 25, 2009

delicious with chrome

Delicious est un genre de bookmarking online avec du partage et des tags. Je l'utilise surtout comme synchronisation de mes bookmarks entre le travail et la maison.

On peut ajouter des boutons pour Chrome en suivant les instructions à http://delicious.com/help/bookmarklets.

Parlant de Chrome, j'aimerais parfois avoir un équivalent de Vimperator avec Firefox, mais rien n'est parfait comme on dit.

focus-follows-mouse-noautoraise on win7

 Ça commence à faire trop longtemps que je cherche une façon de faire ça.

Tweak UI fonctionnait sous XP, mais il fait sa chochotte et ne s'installe pas sur 7.

La case à cocher nommée "Activate a window by hovering over it with the mouse" dans l'Ease of Access (attention à la voix) m'a rendu souriant pendant environ 3 secondes, durant lesquelles je réalise la triste vérité; ça autoraise. AH! Tellement désagréable. J'ai failli vomir.

Je suis aussi tombé sur http://steve-yegge.blogspot.com/2008/04/settling-osx-focus-follows-mouse-debate.html qui parle de la chose pour OS X. Bien intéressant. Comments hilarants.

Bref, j'ai vu TXMouse à quelques reprises mais on dirait que chaque recommandation de ce software venait avec un désavantage. Je vais peut-être l'essayer quand même...

Edit 2009-11-12: J'ai utilisé TXMouse pendant quelques temps et ce n'est pas très agréable. Ça chie les menus de la barre de tâches et casse le behavior de "Alt-Tab". En plus, je n'ai pas réussi à faire un "raise" en "alt-cliquant", même avec PowerPro (qui d'ailleurs, parlant de caca, a une interface des plus merdiques).

Edit 2010-02-18: Sans trop d'effets secondaires désagréables, on peut modifier de quoi dans le registre.
  Par effets secondaires j'entends, par exemple, que le joli menu contextuel qui apparaît quand on right-click sur un programme de la task bar est difficile à atteindre. Souvent je m'y prend à 2 ou 3 coup de garochage de souris vers l'avant pour pas register un déplacement dans le petit espace de quelques pixels entre la barre de tâches et le menu contextuel (qui est le desktop, qui va focusé, et le menu disparaît car il perd le focus). Ce n'est pas parfait mais c'est bien utilisable. Ça fait faire un peu de sport. Trop de choses disparaissent lors de la perte de focus (comme le start menu).
  ALORS DONC:
[HKEY_CURRENT_USER\Control Panel\Desktop]
On doit ajouter 0x41 au premier (gauche) nombre de UserPreferencesMask pour avoir Full-x (pas testé) ou 0x01 pour focus-follows-mouse seulement. La valeur dans mon registre est alors devenu 9F 3E 07 80 12 00 00 00.
On pourrait mettre un délai par cette clef?: ActiveWndTrkTimeout.
ref: http://www.vistax64.com/vista-installation-setup/23538-focus-follows-mouse-possible-vista.html#post363137
http://www.jan-olof-lindqvist.se/windows7_and_vista/windows-7-and-vista-mouse-focus-on-window-without-raising-the-window/

Thursday, September 24, 2009

Montrez vos paysages favoris

En cherchant de la documentation sur les joins en T-SQL, je suis tombé sur une page montrant du code LINQ pour faire un left join.

Premièrement, je fût choqué. C'est laid. Mais là n'est pas du tout le but de mon intervention. Quelques posts de blogues plus loin, l'auteur me demande si je désire une pause et m'offre de voir ses photos de voyages. Bof, non.

Cependant, le mec en question nous dit que son slideshow est fait avec un tool en forth pour interfacer du Google Street. WTF. Bref, il utilise un interpréteur forth codé en java pour envoyer des commandes de mouvements à google street pour finalement nous étourdir avec des 360 pans. J'en croyais pas mes yeux. C'est une idée très bizarre. Allez voir par vous-même: http://solidcoding.blogspot.com/2009/01/virtual-florida-keys-vacation-with.html. Solid code. C'est fou.


\begin{document}

J'ai été au meilleur dépanneur de Laval, "À tout prix", plus précisément à Duvernay.

Il y a vraiment beaucoup de bière.

J'ai entre autres gouté à l'Étoile du Nord, caractérisée d'abord par une violente décharge de pression à l'ouverture. Je croyais qu'elle m'avait explosé dans les mains. Aucun mélange précieux n'a été perdu, à mon grand étonnement. Malgré tout, elle était bien bonne. 

Ce post est d'abord un test, étant le premier.