discord.jse.io" itemprop="description"/>

JSE's Blog

Jonah's blog is here

Web/Technology

Web development and Technology related topics.

UPDATE June 11, 2017

This should help clarify things for people who have issues with this driver for their mouse and perhaps could help solve future issues for people down the road if they want to contribute to hosting their mouse driver.

While I initially thought there was only one model of a Blackweb gaming mouse it's been brought to my attention though comments (here and on youtube), discord, and emails that people can't get this to work. Apparently Walmart has several models (Figures) of this mouse and some use a different drive. Additionally, turns out the particular gaming mouse my brother got was one like this, not the older BWG66 model, so I cannot say if the BWG66 will work or not with this driver.

Anyhow if you have a different model and this driver does not work, but you have the ability to upload the particular driver for your model from the CD you got, along with a link or description (or a walmart store link) of the particular model you have please email it to me at [email protected] and we can talk about hosting it here for others with a similar model (if you're trustworthy of course ;) ) Screenshot of the walmart store link I provided above if they decide to remove it down the road: http://jseb.ca/blackwebmousepage.png

The one we have essentially has two buttons on the side in addition to the standard mouse buttons along with a "DPI" button that also changes colours with the mouse DPI. It has a black top, all one piece on the top (unlike the pictures I saw in the original BWG66 post I linked).

So I hate optical drives, and in both the PC I built for myself and the one my brother uses doesn't even have one inside it. Seriously, I want optical discs to just die.

But recently for my brothers birthday he got a "Blackweb Gaming Mouse" which was purchased at Walmart Canada. A CD came with the mouse, supposedly with the driver/utility, but generally we just head online to find the driver and download it from there.

Well not this time. People have asked on Reddit, and YouTube, and on Walmart.ca itself, nobody knowing an answer on where to get the drivers.

So I'm not sure if they just didn't get the CD or they just refuse to insert one into their PC, but I took the time to fetch the setup file (It's literally the only file on the CD) and upload it here. It's only ~5MB, and to be honest it's way more clunky than Logitech/corsair software I've used, but it gets the job done. It definitely does have "cheap" written all over it but hey... if it works, at least you got the full functionality that was advertised on the box.

It lets you change the color profiles, change button functions (including changing the function of the "DPI" button) and DPI itself from a graphical interface among other things. I didn't look over very much since the mouse isn't mine anyway. But anyhow...

If you have this mouse... then look no further than here.

Download link:

Click here

Screenshot: screenshot

If any nerds out there want to mirror this that would be great just so I don't lose it down the road if I decide to make server changes, but hopefully I wont ;)

Microsoft debuted the "ribbon interface" back in 2007 to give Office a fresh new look to compliment its new features. Many complained it was counterproductive much like the former assistant present in office releases before 2007 (who doesn't remember clippy?), but honestly, it wasn't bad looking from a design standpoint. The fresh new design was the only thing that made me like it. Courtesy Wikipedia LGPL <http://commons.wikimedia.org/w/index.php?curid=25484245>

Going on that, in 2017, LibreOffice, the most popular open source office suite alternative ever since Oracle destroyed the forever loved OpenOffice, has also implemented its own take on the ribbon interface. However, while I'm no designer, it's not hard to tell from comparisons that not only have they implemented a functionally worse interface, they also did a splendid job of making it one of the ugliest by maintaining the pre-office 2007 design elements. Like please, using classic win32 tab controls instead of actually making it a "ribbon interface"? There's not even a little padding in the tabs? It's all crunched together.

libreoffice ribbon

Granted this is still "experimental", and the theme extensibility of some linux desktops does make it more tolerable, but let's be honest here, nobody in the ~1% of Desktop Linux users actually want this. Please, if you're going to invest this much time into it, at least make it look better in Windows, the platform that debuted this with the user base of pretty much the only users who will actually (maybe?) use it. Otherwise what's the point of wasting so much time on it?

Happy monday!

TL;DR: If you just want the rewrite rules for Lighttpd, scroll to the bottom code snippet.

So like most every other PHP app I've worked with, everybody seems to support both apache and nginx but poor old lighttpd gets left out in the cold and has no support on how to configure it in documentation.

Well have no fear, because you'll have to pry lighttpd out of my cold dead hands!

A while back I setup a VHOST for jseb.ca on Lighttpd with an FTP server so I could integrate it with Sharex. One other feature sharex seems to support is "short URLs" using an API from a PHP script called YOURLS. So I wanted to install it on my low end box.

Now if you caught on earlier, this blog is hosted using a flat-file database platform called htmly, because my lowendbox with only 128MB RAM isn't really ideal for running something like wordpress. MySQL can sure eat the RAM, so I sort of decided to not use MySQL on this server at all.

SQLite on the other hand is a perfect candidate. While it locks the entire database when you're writing to it, something like a URL shortener is a perfect application, since it's pretty much read only. Only time it writes is when I decide to add a URL, which is a fast query and so few and far between, it's a way better candidate for a personal URL shortener over MySQL anyway.

Unfortunately, YOURLS doesn't support SQLite out of the box. Luckily there's a great project here on github that adds it. Sweet! That was easy! Install php5-sqlite on my Debian install, chown/chmod your stuff so PHP can write to the directory YOURLS is in, install it by going to /admin/ and we're all set.

However, first thing you'll notice if you're running lighttpd is you'll get 404s since lighttpd doesn't support .htaccess, which YOURLS generates when you first install it. A search around on the internet will find stuff like this, but all the snippets in the examples causes issues for me.

While the last post from gsdefender (from Apr 24, 2016) works, my index.html on jseb.ca doesn't! Now I know it's not special, but it triggered me that if you visit the root, rather than showing my index.html it resulted in a redirect loop which freaked out Chrome.

Now like you probably figured out by now if you read anything here, I'm not much of a sysadmin or programmer, but I know my way around enough to be dangerous. I never got my head around regex stuff, but a quick look at lighttpd documentation says the ?

match zero or one of the previous symbol

Previous being keyword here... I just removed it.

So, now, with a vhost setup and mod_rewrite enabled for lighttpd, my lighttpd.conf looks like this for jseb.ca:

$HTTP["host"] == "jseb.ca" {
    server.document-root = "/var/www/upload/"
    url.rewrite-once = (
#        "^/([0-9A-Za-z-]+)?$" => "/yourls-go.php?id=$1",
#        "^/([0-9A-Za-z-]+)?\+$" => "/yourls-infos.php?id=$1",

        "^/([0-9A-Za-z-]+)$" => "/yourls-go.php?id=$1",
        "([0-9A-Za-z-]+)\+$" => "/yourls-infos.php?id=$1",
)

As you can see, the original copy-pasta from the github issue is commented out so you can note the difference between the two. It works for me... now my uploads and shorturls both reside on jseb.ca and coexists pefectly along with an index.html. So hopefully this helps anybody else who wants to run YOURLS on lighttpd.

Why did they put the ? to begin with? I don't know? enter image description here

I couldn't upload images to htmly with my lighttpd config. Further, the lighttpd config blocked my favicon.ico file. All images would result in a 404 when uploaded, despite ls-ing to the directory shows it uploaded successfully. I'm not using vhost with lighttpd... and honestly ... I blindly copied and pasted the config directly from the htmly documentation found on the github readme (and of course... enabled the rewrite mod in lighttpd.conf which is as simple as uncommenting. The verbatim code was:

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/includes" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/admin/views" {
  url.access-deny = ( "" )
}

url.rewrite-once = (
  "^/(themes|system|vendor)/(.*)" => "$0",
  "^/(.*\.php)" => "$0",

  # Everything else is handles by htmly
  "^/(.*)$" => "/index.php/$1"
)

My issue was I would get 404s on images I upload. So I modified the line "^/(themes|system|vendor)/(.*)" => "$0", to show "^/(themes|system|backup|vendor|content/images)/(.*)" => "$0", since content/images is where the images reside when you upload them with htmly. Additionally, backup was added so you can download backups direct from the interface.

Next, I added a line directly below it "^/(favicon\.ico|robots\.txt|humans\.txt|sitemap\.xml)$" => "$0", which of course, ensures favicon.ico, robots.txt, humans.txt and sitemap.xml actually works.

It works. It's not perfect. I want to be able to create other directories without rewrite screwing me over for hosting random files and whatever else I feel like. Perhaps I'll setup proper vhosts and elaborate on that down the road as I work on this site. For now the config is in /etc/lighttpd/lighttpd.conf at the bottom, and it gets the job done, so I'm happy.

FWIW... here is my entire config I ended up modifying to for those of you who also want to blindly copy and paste :P

$HTTP["url"] =~ "^/config" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/includes" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/system/admin/views" {
  url.access-deny = ( "" )
}

url.rewrite-once = (
  "^/(themes|system|backup|vendor|content/images)/(.*)" => "$0",
  "^/(favicon\.ico|robots\.txt|humans\.txt|sitemap\.xml)$" => "$0",
  "^/(.*\.php)" => "$0",

  # Everything else is handles by htmly
  "^/(.*)$" => "/index.php/$1"
)

But yeah.... fixes that issue for you lighttpd users out there who can't upload images with the htmly platform :)

Why am I using lighttpd? Well certainly apache is out of the picture for a 128MB Low End Box. Lighttpd was the choice mainly because I've used it more than nginx. I like nginx and have used it a bit but lighttpd gets the job done for me where I have more experience with it (it use to serve the chickentalk.org forums I used to run a few years ago well so you can say I used it in "production") and is rock stable as far as I can tell for all the memory leak complaining I've heard about in the past, so I use it.

Perhaps one day I'll switch to nginx since that's where the community is at, but old habits die hard. It's always been my goto apache alternative.