If you try to open Office 2007 document (.docx or .xlsx) in Far Manager it will simply open them as a ZIP archive. Clearly, that’s not what you want. Here’s how to fix it:
- Go to Commands â€º File association.
- Create a new association by pressing Ins.
*.doc;*.docx;*.xlsx;*.pptx as a mask.
@"!.!" as Execute command (used for Enter).
You can still open docx file as an archive by pressing Ctrl+PgDn.
Idea for my business is quite simple: web gallery for wedding photographers. Here’s how it works:
- PhotographerÂ uploads photos after the wedding.
- Friends and relatives view photos. Some of them order reprints generating extra money for photographer.
- Photographer pays me a monthly fee.
How did I come up with this idea? I was looking for an idea for my own software product for a long a time. Then, in one of the books I read an interview withÂ Joel Spolsky where he recommended creating a niche product. As an example he suggested creating a photo manager specifically for wedding photographers instead of photo manager for everybody. And I thought to myself: heck, that’s not a bad idea, I’ll try to execute it.
Surely, there are other products that do the same thing. This doesn’t stop me. If my execution is at least half-good, I should get some clients. I’m aiming at creating a small Italian restaurant on the web, not a global chain of fast food franchises.
This is a nice trick: in Far Manager, invoke drive menu by pressing Alt+F1:
Select CD-ROM and press Delete. CD/DVD will get ejected.
You can also press Del key on network drives to unmap them.
In Far Manager 1.70 you could browse folders with mouse wheel. Rotating wheel would scroll up and down. Middle-click would open a folder. But version 2.0 disables middle-click. Boo! Never take away features from users.
Fortunately it’s very easy to restore this functionality:
- Launch [C:\Program Files\Far2\Addons\Macros\MiddleClickAsEnter.reg]. If you don’t have this folder re-install Far and add Addons Â» Macros feature.
- Restart Far Manager.
Freshly installed Far Manager looks um… small:
Here’s how to make its window bigger:
- Right-click on the window title, select Properties
- Switch to Font tab
- Select a bigger font. I prefer raster font 10 x 18.
- (optional) Switch to Layout tab and change window size there. I leave it as 80 x 25.
Sometimes I need to do something with file that Far Manager can’t help me with. Good example is changing file permissions. In these cases Windows Explorer context menu comes handy:
If you want context menu in Far Manager you need EMenu plugin. Fortunately, it is included with Far by default. Here’s how to set it up:
- Execute [C:\Program Files\Far\Plugins\EMenu\Hotkey.reg]
- Restart Far Manager
- Open Options menu, then Plugins configuration. Select EMenu in the list.
- Uncheck “Show message after execution”.
Now Menu key should invoke context menu. Nice trick is to select Send To – Mail Recipient to quickly open new email with the file attached.
Have you ever encountered this error:
Invalid postback or callback argument. Â Event validation is enabled using <pages enableEventValidation=”true”/> in configuration or <%@ Page EnableEventValidation=”true” %> in a page. Â For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. Â If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
First, let’s reproduce the problem. Create a new website and copy/paste this code:
<asp:DropDownList ID="dd" runat="server">
<asp:Button ID="Button1" runat="server" Text="Test" />
$("#<%= dd.ClientID %>").append($("<option />")
If you select option “Three” sure enough, exception is thrown. To prevent it you need to supply all possible values for drop-down control:
protected override void Render(HtmlTextWriter writer)
// and so on
The exception is fixed but server variable for drop-down control is useless – it has no idea that you’ve added new item so dd.SelectedValue will give One, not 3. You need to read POST variable directly instead, like this:
protected void Page_Load(object sender, EventArgs e)
Here’s how you can view whitespaces in Emacs:
M-x whitespace-mode RET
By default, Emacs uses bright colours to highlight whitespaces that are in wrong place (in Emacs’ opinion):
To disable colouring add the following to your .emacs file:
; disable colours in whitespace-mode
(setq whitespace-style '(space-mark tab-mark))
Now it’s much better:
I assign showing white spaces to Ctrl+Shift+8 to mimick Visual Studio behaviour:
(global-set-key (kbd "C-*") 'whitespace-mode)
Let’s say you use Far Manager and want to launch PowerShell script. With default installation pressing Enter on PowerShell script in Far Manager will open the script in Notepad. Not very helpful.
Here’s how to configure Far Manager to launch PowerShell script by pressing Enter key:
- Open Commands menu, select File associations.
- Press Ins key to add new association.
- Enter *.ps1 as file mask.
- Enter the following as execute command:
powershell.exe -file "!.!"
Bonus: how to change colour of PowerShell scripts to green:
- Open Options menu, select Files highlighting.
- Locate *.exe,*.com,*.bat entry, press Enter to edit.
- Add *.ps1 to the list, select Ok to save.
See also: Running Windows PowerShell Scripts
Update: there is an enhancement that allows passing arguments to the script and launch script in a separate window.
Hi, my name is Pavel and I want to quit my day job.
Where am I now
At the moment Iâ€™m working full time as software developer.
Where do I want to go
I have had an idea of starting my own business for quite some time. I decided to build my business on the side. Iâ€™m going to work on it part-time. My goal is to grow my business to the level where it could support me and my family. At that stage Iâ€™ll be able to quit my day job.
I have a lot of distance to cover. I need at least $5,000 per month to quit my day job:
- $1,900 â€“ home mortgage
- $2,000 â€“ living expenses (food, electricity, gas etc)
- $1,000 â€“ just in case (buffer)
Fortunately we donâ€™t have any credit card debt.
I definitely donâ€™t want to take any investments. I want to bootstrap my way up. My business should pay for itself.
I will post updates about my actions here, on this blog. Hopefully this will prevent somebody from making the same stupid mistakes as I do.
With this blog Iâ€™ll try to answer this question: â€œIs it possible to start home-based business on the side, without quitting day job?â€.