Linux & Windows Tips, Tutorials, , Ideas

HowTo: Find a Directory On Linux Based System

I just switched from MS-Windows server admin to Debian Linux server admin role. I need to find a directory called project.images. I was also told that the locate command is the simplest and quickest way to find the locations of files and directories on Linux. But, the locate command is not working out for me.Read more about HowTo: Find a Directory On Linux Based System[…]

Share Button

MySQL – myisamchk: error: myisam_sort_buffer_size is too small

f you’re trying to repair large MyISAM tables in MySQL, you can run into the following restriction, because of the limited size of the default Sort Buffer. [email protected] # myisamchk -r table.MYI – recovering (with sort) MyISAM-table ‘table.MYI’ Data records: 335045 – Fixing index 1 Found block that points outside data file at 1509428340 FoundRead more about MySQL – myisamchk: error: myisam_sort_buffer_size is too small[…]

Share Button

Mikrotik Hotspot: Different login page for Mobile Users

Recently a Nigerian friend asked about how we can configure different login page for Mobile users , which could be a light weight and customized for mobile/pda screen size with customized welcome message. Following is a quick method on how you can display different login page if user is login from mobile or device, & default login page for desktop users.
This is quick method, but if you want more sophisticated method like detect client by device, then you can use variable functions and act accordingly.
First the logic: You have to create 3 html pages,

1-     login.html
2-    mobilelogin.html
3-    otherlogin.html

1- login.html [Re directer which check user device/screen size]

login.html page is a kind of re directer which will actually check the screen size of client device/screen. If it found it less then 800/600 , it will assume its a mobile device and will redirect to mobilelogin.html,
otherwise it will display another login page otherlogin.html which could be default login page for all.
First create login.html

1
2
3
4
5
6
7
8
<script type="text/javascript">
if ((screen.width<=800) && (screen.height<=600)) {
document.location="mobilelogin.html";
}
else {
document.location="otherlogin.html";
}
</script>

Read more about Mikrotik Hotspot: Different login page for Mobile Users

Share Button