Run the script with a -x parameter and it will run the script in its entirety but print each line before it executes.
Explorer / “file open” dialog sort order problems
Here's the part that made Windows save this sorting information everywhere. Hold down the Ctrl key and click the X in the upper right-hand corner of the Window to close it. Now whenever you run a Windows application that uses the File Open, Save, or Save As dialog boxes, the files are listed in Date Modified order rather than Alphabetically.
Order coffee at Starbucks
Syrups Available:
- Regular: Vanilla, Hazelnut, Mocha, White Chocolate Mocha, Cinnamon Dolce, Toffee Nut, Melon, Raspberry, Juicy Raspberry, Classic, Peppermint, Caramel, Chai
- Sugar Free: Vanilla, Hazelnut, Cinnamon Dolce, Caramel
- Traditional Seasonal: Gingerbread, Pumpkin Spice
Reference: link
Grep Using Regular Expression Example
Use the following example with Cygwin to "-r" recursively scan "-i" ignoring case "-l" list files and use "-E" regular expression which finds all strings that have a pairing of
grep -r -i -l -E 'personal.+information' *.jsp
SQLite IN (Select Example
CREATE TABLE results AS SELECT * FROM loganalysis
WHERE bookingnumber
IN (SELECT bookingnumber FROM advisoryitems GROUP BY bookingnumber)
SQLite and PHP Example
Eject USB Device Shortcut
Create a shortcut using the following link:
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll
App_Offline.htm and working around the “IE Friendly Errors” feature
I posted the slides+demos from my ASP.NET 2.0 Tips and Tricks talk online last week from the ASP.NET Connections Conference in Orlando. One of the new features I talked about was the "App_Offline.htm" feature in ASP.NET 2.0, which provides a super convenient way to bring down an ASP.NET application while you make changes to it (for example: updating a lot of content or making big changes to the site where you want to ensure that no users are accessing the application until all changes are done).
The way app_offline.htm works is that you place this file in the root of the application. When ASP.NET sees it, it will shut-down the app-domain for the application (and not restart it for requests) and instead send back the contents of the app_offline.htm file in response to all new dynamic requests for the application. When you are done updating the site, just delete the file and it will come back online.
One thing I pointed out in the talk that you want to keep an eye on is a feature of IE6 called "Show Friendly Http Errors". This can be configured in the Tools->Internet Options->Advanced tab within IE, and is on by default with IE6. When this is on, and a server returns a non HTTP-200 status code with less than 512 bytes of content, IE will not show the returned HTML and instead substitutes its own generic status code message (which personally I don't think is super friendly
So if you use the app_offline.htm feature, you should make sure you have at least 512 bytes of content within it to make sure that your HTML (instead of IE's friendly status message) shows up to your users. If you don't want to have a lot of text show-up on the page, one trick you can use is to just add an html client-side comment with some bogus content to push it over 512 bytes.
Trimming Whitespace with Regular Expressions
Trailing white space:
[ \t]+$
Leading white space:
^[ \t]+
Both leading and trailing:
^[ \t]+|[ \t]+$
Also use the following if you want to trim line breaks too:
[ \t\r\n]
Getting Function List to work with Notepad++ 5+
Open About box of Notepad++ to determine if you are using UNICODE or ANSI
FunctionList_unicode.dll - UNICODE version plug-in
FunctionList.dll - ANSI version of plug-in
Copy the respective DLL into your plug-in folder.
Here's the plugin: NotepadPlusPlus_functionlist_plugin_for_v5
