Big deception. I was expecting some kind of new UI and more hardware features.
I guess we’ll have to wait for V2 and see…
Wordpress adds a little code to your root .htaccess in order to catch all URLs on your website and process them. It works fine if you only have Wordpress on your websites and normal files/folders. But should you have a password-protected directory, Wordpress might catch the 401 page as well which results in never showing the login authentication box at all.
I tried to add additional RewriteCond and RewriteRule to catch the password-protected directories before Wordpress does but without success. The trick is in fact much more simple than that. You simply need to tell Apache to go to a custom 401 page of your choice (it can be blank or the default page, doesn’t matter). You will then be prompted with a login box and let you proceed to the password-protected directory. Should the login be wrong, the custom page will be displayed. No more annoying Wordpress url rewriting!
Here’s the code: (notice the usual Wordpress code, you simply need to add the ErrorDocument line above it)
ErrorDocument 401 default
# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
# END WordPress
Reaper > Cubase 5
Dec 27
DAW software are quite expensive, about 300-500$ depending on the version. I was looking to upgrade my Cubase AI 4 which is 32bit only to a 64bit-capable DAW. Cubase Studio 5 was the logical choice with it’s new 64bit version. Then I saw the price: 339$. Not quite what you call a deal, only to get 64bit support. Considering version 5 had no useful new features (only ANOTHER beat maker among the new “features”, as if we needed YET ANOTHER one). So it was clear I wasn’t going to buy this.
Then I read on EastWest forums about Reaper. It’s a DAW that is even more optimized than Cubase, has 64bit support, free routing of MIDI and audio. The price? 60$. But wait, prepare to be shocked, it only does everything Cubase 5 can do and more. Another surprise? It’s less than 5mb and the license is good for another major upgrade in the future. It looks even better than Cubase 5.
But the best thing about Reaper is the workflow. In less than 2 minutes, I was ready to go, VSTis loaded and ready to play. It appears to be much more stable than Cubase as well and an even lower latency.
I’m still using the 30-day evaluation version but I’m definitely getting a license in the next weeks.
Finally an audio product made by audio developers and not a marketing team.
Uncharted 2
Oct 18
3 simple words:
BUY THIS GAME
Epic gameplay, graphics, audio and multiplayer. If you own a PS3, it’s definitely a game to get.
Owners of Gigabyte motherboards probably noticed the phase LEDs on their motherboard. Turns out you can have them enabled while using your PC. It shows you the current CPU usage. It requires you to install and activate their Dynamic Energy Saver app.
That’s exactly what I did. Sure enough, the LEDs were working just fine. But their dynamic saving features also causes some serious audio issues. I started to hear frequent pops and clicks noises when listening to audio, and that from any audio applications. I first tried to re-install drivers, disable some apps I had recently installed, no luck. Then I had the idea to de-activate the DES functionality: no more audio issues.
Even more proof that you shouldn’t install any applications that comes bundled with your hardware.
PHP is quite flexible in the way you write code. You can write same code in about 10 different styles and it’s still going to work. The problem is when you try to read and understand someone else script. It’s either well documented or completely unreadable.
In my opinion, writing large blocks of documentation is, most of the time, useless and time consuming. It is possible write code in a way that it can be read by anyone with very short amount of documentation. It all starts with naming your functions correctly, dividing long blocks of code in short functions that are self-explained.
So I decided to share some best practices I’ve read or learned over time.
Naming
// INCORRECT function Getlastmessages() function GetLastMessages() function getLastMessages() // CORRECT function get_last_messages()
Sure the CamelCase version isn’t bad, but the best way to name methods is by separating words with an underscore.
You should name your classes the same way but by using an uppercase letter as the first letter. (ex: Get_last_message)
Constants also follow the same rule but all letters are in uppercase (ex: GET_LAST_MESSAGE)
HTML Output
Unless the HTML to output is relatively short, you should always close PHP, write your HTML and then open PHP back.
Use the short <?= tag (if enabled on your server) to open PHP to output a variable.
TRUE, FALSE and NULL
// INCORRECT
$var = true;
$var = True;
if($var == null) {}
// CORRECT
$var = TRUE;
$var = FALSE;
if($var == NULL) {}
Always write conditional values in uppercase.
PHP Files ending
As strange as it sounds, you shouldn’t close PHP at the end of PHP file. You should instead include a standard comment at the end and that’s it.
<?php // PHP CODE HERE /* End of file index.php /* Location: ./application/index.php */
Why? Because PHP will close automatically as it reaches the end of the file but more importantly, it will prevent any whitespace or line breaks issues at the end of the file.
UTF-8 File Encoding and Unix line-breaks
Your code editor should always be configured to use UTF-8 encoding and Unix style line breaks. This will ensure compatibility with most languages and servers configuration.
Useful Adobe Fireworks tips
Jul 27
- While drawing a line, hold down SHIFT to make it straight horizontally or vertically.
- While drawing a rectangle, press the UP or DOWN arrow keys to make the corners round (or sharp).
- You don’t need to ungroup to edit objects within a group, simply use the Subselection tool to select and edit an object.
- Change the corner roundness mode to px instead of %, making duplicates with various size won’t affect the roundness anymore.
- Use the arrow keys (with an object selected already) to position precisely an object.
- To apply a fade effect on any object, use the Auto Vector Mask command found under the Commands > Creative menu
- You can curve a text object by drawing an ellipse, selecting the text and the ellipse and applying the Attach to path command found under the Text menu.
That’s it for now!
Apple = bunch of whiners
Jul 16
Microsoft probably got the best phone call in history, it’s worth reading:
http://gizmodo.com/5315666/microsoft-gloats-apple-begged-them-to-stop-running-laptop-hunter-ads
Way to go Apple…
If you don’t use an anti-virus and your friend is trying to send you a file over Windows Live Messenger, you probably noticed that it requires you to have an anti-virus installed or the download will fail. Sure, it’s a good protection I guess, but providing an option to disable that functionality would have been appreciated…
Fortunately, you can bypass this protection quite easily.I made a little C++ .exe that simply returns 0 and exit. Basically, an empty project in Visual Studio! Then you simply assign that .exe as your anti-virus in Windows Live Messenger.
1) Download the app: DoNothing.zip
2) Extract the .exe to a location of your choice (My Documents).
3) Set the anti-virus in Windows Live Messenger:
- Go to Tools > Options > File Transfer
- Check the Scan files for viruses using option
- Click Browse… and select the DoNothing.exe application you extracted.
Enjoy file transfers without an anti-virus
While developing an AIR application, I had an issue with bringing the application to front (above all other windows) when clicking the systemTrayIcon.
Usually, you would use the method:
systemTrayIcon.addEventListener("click", function() {
window.nativeWindow.orderToFront();
});
But doing so will result in… actually nothing at all. The window doesn’t move.
Using the same code on a menu item of the SystemTrayIcon will work, but not on the click action of the Icon itself.
Workaround:
Set the window property alwaysInFront to true and then to false:
systemTrayIcon.addEventListener("click", function() {
window.nativeWindow.alwaysInFront = true;
window.nativeWindow.alwaysInFront = false;
});
Not the way it should be, but it works…