Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/beardedd/public_html/home/index.php on line 71
HOWTO Compile spelldiff Extension for SQLite3 on Windows 10 
I recently was able to compile an extension for SQLite3 on Windows 10. I wanted to use the editdist3 function for SQLite3 which is used to compare how similar strings are. To get he function you have to compile the extension from source code. I will provide the compiled extension here as a DLL as well as the process to compile from source.

Firstly, I found that I had a compiler available to me on the Windows cmd prompt. I think this is because I have Qt Creator installed, which is a free download and a great tool for writing GUI programs with C++ if you know about that. So I'll assume you have gcc available to you on the command prompt.

Next, you need to download the source files from the SQLite website: https://www.sqlite.org/download.html
Get the sqlite-amalgamation ZIP and the sqlite-src ZIP, you will need both.

Extract the sqlite-src ZIP to a temporary folder. Open the sqlite-amalgamation ZIP and copy the sqlite3.h and sqlite3.c files to clipboard. Open to where you extracted the sqlite-src ZIP with Windows Explorer then go into the ext/misc folder. Paste the sqlite3.h and sqlite3.c files into that folder.

Next, open a cmd prompt and change to the sqlite-src/ext/misc folder. Enter the following command to compile the extension:
gcc -I -g -shared spellfix.c -o spellfix.dll

After a little work time, the cmd prompt will return and you should find a file called spellfix.dll in the sqlite-src/ext/misc folder.

To use the extension, it depends on how you're using SQLite. If you're using a front end program, check the menus for a Load Extension type option, and select the spellfix.dll file. You can then use the editdist3 function in SQLite.


SQLite - Spellfix Implementation
SQLite Download
Qt Creator

[ view entry ] ( 635 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 106 )
Easy Way to Track Domains in PiHole 
After you install Pi-Hole to suck ads from your network, you probably will load some domain lists (gravity lists or something they call them) to black or white list domains. If you start using your devices on the network, you'll probably find somethings don't work because domains are being blocked, and some thing wont block ads.

To monitor pihole's activity you use:

pihole -t

on the linux console command line. This will show in real-time the activity that the pihole software is undertaking. it's very hard to keep track of whats going on with this, as you have to verify the IP of the client and then try to see which domains etc. there's just generally a lot of info going on and the screen scrolls up rather quickly even with only 2 devices connected to pihole.

Instead, you should filte rthe pihole activity down to a single client, the client device you are using to troubleshoot. To do this, just use a pipe and grep the output based on the IP of the device you want to see:

pihole -t | grep .188

For example, this will show me the activity of the device on my network that is

It also filters out the lines in the output that say whether a domain was blocked or not, it will just show us that client .188 accessed whatever domain. We can then load the pihole web interface and check the Query Log to see if the domain is blocked or not, then black/whitelist it to see if it makes the desired change we want.

[ view entry ] ( 337 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 161 )
rsync --delete not working? 
If you issue an rsync command with the --delete option in it and you find it isn't removing non-existent source files from the target, when you google you will find a whole host of answers that say "don't use a wildcard character * on the end of the target path!"

that's all well and good until you aren't using wildcards and --delete still isn't working!

what you do need on the end of the target path is a trailing slash / character for --delete to work!


rsync -avzh --progress --delete -e 'ssh -p 31337 -i /home/user/keyfile.private' user@host.net:/home/user/backups /home/localuser/backups

will NOT do the --delete for you!

rsync -avzh --progress --delete -e 'ssh -p 31337 -i /home/user/keyfile.private' user@host.net:/home/user/backups/ /home/localuser/backups

WILL do the --delete for you!

[ view entry ] ( 169 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 170 )
Mazda CX9 / Vehicle Spare Parts 
This is an entry to explain how to look up spare parts for cars online.

SupercheapAuto My Garage

The best way to find spare parts for your Mazda CX9 or any vehicle is to go to supercheapauto.com.au and use their "My Garage" feature. Enter your vehicle registration number, or choose which model vehicle you want to find parts for, click the little yellow arrow head that points down on the My Garage section on the main website page and then click "Shop All Parts For My Vehicle".

The page that loads will look a bit like a website from 1998, and it shows you all the spare part categories on the left which you can use to filter the products shown on the right. This catalog system is pretty good and it shows you photos of the parts in some cases which is really helpful. Once you find a part you want, you should then get some sort of part number, code or brand name you can google further to get more info.

Google for more Info

For example, I was after an air conditioning/heater blower motor for my Mazda CX9. I looked up the part in SCA's My Garage, then noticed it was made by a company called JAS Oceania.

Googling JAS Oceania brought up a location only about 1km away from the SupercheapAuto store's location in my area. In other words, the supplier of the part is in the same suburb as SupercheapAuto's store. I might be able to buy directly from the spare part manufacturer? The advantage to doing this is a lower lead time. I might be able to get the part immediately instead of waiting for SCA store to have it sent over to them, which can take at least a half day and usually takes a day on average in my experience.

Most spare parts, but not all, will have a part number on them and perhaps a brand name. This is a really good way to find the part online. Google for the brand and part number and you will find you can probably buy the part from a number of online stores, but buyer beware - I found the blower part I wanted on AliExpress but it wasn't the full part with the cylindrical fan blades attached. It was only the motor segment of the part and the pricing was about the same as buying the whole part locally. I prefer and recommend buying locally over online, especially for automotive spares because if the part is incorrect you can return it and exchange it or get a refund. Doing this is a big hassle with online purchases.

[ view entry ] ( 167 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.9 / 177 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>