Today I want to share with you a very useful tool to instantly switch your Windows/Ubuntu hosts file. If you’re unfamiliar with the term ‘hosts file’, this WIKI should help.
Anyway, by using this tool you can immediately switch to a new hosts file, by at most two clicks of mouse (actually, it is one click and one double-clicks :P). No installation needed, but you will need a full-write access to your hosts file.
Other than that, depending on your Operating System, you might need:
Windows:
.Net framework 2.0 and upper.
Linux:
Mono 1.2 and upper
root access
nscd Service
ifconfig commmand
Here is how the main interface looks like:
Really simple right?
Interested? You can visit and download it at: Host Profiles @ Codeplex . It’s FREE! And it’s open source too.
Have a great weekend everyone, Cheers!
About Hardono
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.
About two or three months ago, I started using Dynamic Widgets to regulate how the *ehm* Google’s Ads is showing in the sidebar. This is due to Google’s policy on how many number of ads can be displayed in a page.
I was happy 🙂 Dynamic Widgets user interface is really easy. You just need to declare your sidebar widgets as a dynamic instead of static. Then continued by define the rules that regulate when that particular widget is shown or hidden by clicking list of check-boxes describing the conditional logic.
Sadly, today I found out that the Dynamic Widget is broken. It didn’t recognize that the current page is a Tags archive page. The result is obvious, it disregard any logical conditions that I previously set and messed up my sidebar.
It is very likely that my recent upgrade to WordPress 3.3.1 is the primary cause. Since I don’t want to revert to previous WordPress version, I look out for replacement. Then I found out Widget Logic. If you are familiar with Boolean logic, Widget Logic is super effective. Instead of clicking check-boxes for configuration, you write your own logical condition. Widget Logic only evaluate those widgets that have something in their ‘Widget logic’ field. If their ‘Widget logic’ field is empty, the widget is simply treated as static widget.
As you can see, the logical condition is composed using WordPress’s functions. Here are the list of WP’s commonly-used functions that could help you:
is_front_page()
is_page()
is_single()
is_tag()
is_category()
is_archive()
For complete list of functions, you could refer to WordPress documentation.
And if you’re not familiar with Boolean logic, you could learn how to do it HERE.
Quick Example
!is_tag() && !is_page() && !is_single() && !is_category() This widget will be shown if the current page:
is not a Tags page, and
is not a Page (not a Post), and
is not a Single post, and
is not a Category page
I hope it helps, cheers!
About Hardono
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.
This DIV is basically the area where user will click to expand/collapse your content DIV. You style the DIV anyway you like, or add whatever content inside the Control DIV as long as you follow this two rules:
the class attribute must contains “sdvExp”. E.g. class=”sdvExp”
it must have an ID. E.g. id=”XXXX”
Example of Control DIV
<div id="XXXX" class="sdvExp">
<p>Test Control DIV</p>
</div>
3. Create Content DIV
This DIV is basically the box that will expand/collapse whenever user clicks the Control DIV. Content DIV only has one rule, its class property must contains “child-ID_OF_CONTROL_DIV” E.g. class=”child-XXXX”
Example of Content DIV
<div class="child-XXXX">
<p>Test Content DIV</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In at commodo tortor.
Donec condimentum rutrum dui, vitae rutrum dolor malesuada a. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Donec facilisis ligula eu risus cursus cursus. Curabitur nec bibendum nulla.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos
himenaeos. Vivamus eu dolor et enim egestas pellentesque ac a sapien.
Maecenas aliquam adipiscing fermentum. Quisque egestas dui sed lacus congue
id sagittis urna mattis. Duis ut cursus libero. Pellentesque lorem neque,
fermentum sed fermentum at, auctor et nisl. Nulla lobortis elit odio.
Suspendisse laoreet volutpat adipiscing.
</p>
</div>
I hope it helps. If you found any difficulty in implementing this, you can always drop a comment. Cheers!
About Hardono
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.