Skip to main content

Posts

Showing posts from 2016

Versioning static files with S3 buckets

Although there's a trend of making single-page applications with frontend static files managed separately from backend api, the need of managing static files haven't gone away just yet. And everyone who does web is aware of common issues with it. Probably the most common one is browser cache. Files get cached in user's browser and are used even after you changed and deployed them. Cache-controlling headers can help somewhat but not much. That's my cache-boosting techniques are usually a must. There are many ways to do cache boosting. Usually, it involves adding some version info into all static urls (e.g. /style.css becomes /style-13.29.css or /13.29/style.css ), hence it's often called "versioning". If you use some Django app to manage your static files (compress, combine, minify, etc.) it often can provide you with some solution. Use it, it's probably reliable and easy. This proposal, however, is cool if you happen to use Amazon's S3 for your...

HTTPS issues with blogger :(

As I wrote in my last post, I'm moving this blog to a new domain. I also decided to put it behind cloudflare to enforce HTTPS and other cool stuff (IPv6, HTTP/2, ChaCha20/Poly1305, etc.) Apparently, google doesn't like that. Now, instead of a nice 301 redirect I get this Which will totally wreck my search results. I guess I'll have to turn off cloudflare until search engines reindex everything and only then turn it back on.

New domain for this blog: geekburg.com

Some of my 3.5 loyal readers might see themselves to this new domain sometime next week when they care to come here. What is this? Have I gone all corporate and will start to earn money on this somehow? I wish, bro. No, I just saw this domain in the expiring list yesterday and thought that it could fit my blog nicely and I never liked 3rd-level domains. The only reason I ever had a blog not on a custom domain is that I wasn't sure whether I'd be able to write more than a couple posts. It appears I was, after all, even though this is neither the most actively updated nor the most popular blog, so it's time to personalize it and make it possible to become google-independent one day if I ever want to. As with everything else, custom domain is the way to be independent from any particular provider. It's true for blogs, it's true for email (I'm one of those who do have custom-domain emails yet are too lazy to migrate from gmail completely). I'm not likely t...

Lenovo Yoga 900-ISK2: shame on you, Lenovo, never again

I have posted a review of Lenovo Yoga 900-ISK awhile back in which I concluded that it's probably the ultimate choice if you need a high-end machine for running Linux. Now that it got renewed to 900-ISK2 it's no longer the case and probably nobody should buy Lenovo products if running Linux is your intention. 900-ISK2 looks really sweet on the hardware side, even faster SSD, and slightly better CPU with IRIS video card (which is probably just enough for decoding 4k HEVC video) while everything else is the same old good. Yet, a slight change in its firmware hiding the AHCI option makes it virtually unusable, locked out without possibility to change the preinstalled OS. A thread on Lenovo forums (19 pages at the time of this writing) included both a Lenovo person promising to escalate this issue with the developers and quote from some other unknown person telling that it's been done this way per agreement with Microsoft. Someone also mentioned that it's possible ...

Samsung flagships comparison: S6 Edge

Today a delivery person came to collect my recalled Note7. I was given a temporary replacement S6 Edge for non-determined period of time, estimated about two weeks. And it sucks for two reasons: replacement is less than ideal and it's too long a wait. So, here's my short comparison of S6 Edge with everything else while I'm biding my time. First of all, I don't like Edge's curved screen, I would've been better off with a non-edge version. Yes, I also tolerate Note7's one (I wouldn't uses as strong a word as "like" here) and it's nothing weird. Note7 feels very natural in hand with its symmetrical body, narrow bezel, and very smooth round edges (less so when using a cover but still), while Edge is way more angular and even somehow bulkier (though Note is both heavier and bigger). Wider curves make Edge UI more useful than on Note, where it requires a very precise gesture to activate, but I'm not that big a fan of those panels and stuf...

Samsung flagships comparison: Note7 vs. S7

As I was saying, for half a year I was a proud S7 user and everything was well except somewhat smallish display. My wife started playing Pokemon GO seriously and S6's short battery life was quite frustrating for her. Meanwhile, Note7 was announced and I had to think hard whether I want one. Good part was that hardware is just as good as in S7 (slightly better but who cares about one more gig of RAM and stuff like that) but with bigger screen and even bigger battery. Lack of a non-curved option sounded like a deal breaker to me though, I'd never buy an S7 Edge. Yet, after carefully watching all the video reviews I decided to try it. Curves are more sloped, with larger flat surface (mainly to make S Pen usable, I guess) and symmetrical design looked cool. Fortunately, my situation is not as it used to be a couple years ago and I don't have to limit myself with only one toy per year (although this year I did indulge myself quite a bit) and S7 didn't go to waste — I gave ...

Samsung flagships comparison: S7 vs. S6

I'm very new to Samsung devices, not so long ago I was sure that expensive phones are not worth it. You have to replace them every year or two anyway, they don't provide new features to justify the price tag, cheaper devices come in better variety and you don't feel bad throwing them away if you don't like them, etc. So for a few years I used whatever cheap Chinese brick was on the market. And before that, well before that I didn't actually own a smartphone. And it was quite all right, comparing notes with friends I thought that annoying bugs and lags from time to time are universal, even if you have four CPU cores and 2 gigs of RAM, that it's mostly a software thing and Java is a bad language for mobile platform, and all that. And then, quite recently, I changed my mind about those things. Partly because my income situation changed slightly. It all started when I needed a birthday present for my lovely wife last year and S6 was out for just a couple months. I...

Samsung Gear Fit2 Review

So, I've got a free Gear Fit2 with my Note 7 preorder. After trying it a little bit, I've decided I don't like it much and now I wonder who might want it (maybe my wife will). And now some photos and pros and contras. Device feels very sleek, I could totally wear it if software were more usable. There is even some security, you can set a pin code that you need to enter after you take it off. Display is large enough for analog clock and date S Health app is not too bad overall (I like its approach to tracking exercise, for one) and syncs quickly but it does a poor job with sleep tracking which is a deal breaker to me. Doesn't estimate how much energy you spend during the day. S Health is not the only app that interacts with Gear, for some things you need to use Samsung Gear app, installing apps to the device is done with Galaxy Apps. There might be more of them. Not sure whether it's good or bad to have several apps for not so many features but probabl...

What to do if your wearable gadget comes with a crappy wrist band, a lifehack

Some devices come with a good wrist band. Take Fitbit Charge HR, for example: Fitbit Charge HR and what wrist band is supposed to look like It's comfortable and there almost no way to lose it between good buckle and additional security band (not shown that it has an additional claw inside to fix it in place). While others are just crappy and too easy to lose: Samsung Gear Fit 2 And how to lose it Just unstrap it with your backpack or something and it slips right off, you'll never notice Huawei Talkband B2 Not as expensive but just as easy to lose I mentioned that Talkband B3 's band, while looking the same, is marginally better. But not much better. What to do with it all? Obviously, the first thing you should do is to let the manufacturer know about this fault. Especially if you already lose some device, go write an angry tweet or post and contact the manufacturer. Repeat often enough and maybe they'll stop doing it. Before th...

Ultimate fitness tracker comparison: Fitbit Charge HR vs. Samsung Gear Fit 2 vs. Huawei TalkBand B3

As I mentioned in my previous post, I have way too many fitness trackers for someone who is not a fitness person. How did this start? Fitbit Charge HR, Huawei TalkBand B3, Samsung Gear Fit 2 Well, Huawei TalkBand B2 was my first wearable device ever and I quite liked it. This week I got a new TalkBand B3 to replace the lost one and it's slightly but better than B2, it's probably the only one I'll never get rid off because it's mostly a headset for me, not a fitness device or a watch. I actually never even considered getting a dedicated fitness device. Then last year I found a Fitbit Charge HR on the beach (whoever lost it on Ta Yai, khop khun krap). And, to my surprise I liked how it works. you see, unlike most of fitness trackers, it's really useful even for occasional tracking: it measures your heart rate continuously so you get a complete data about how intense that quick stair-climbing was (it also counts floors using altimeter), it estimates calories...

Now to prevent Samsung Galaxy Note 7 from exploding

Even if Samsung branches in some countries would like to keep it so*, it's no secret that some Note 7 devices have been sold with a faulty battery and can catch on fire and even explode while charging or shortly thereafter. Samsung plans to replace all the devices sold to ensure our safety even though particular procedure is not always clear (in some countries, anyway). But it will definitely take a few weeks to replace those batteries and deliver everything so what can and should you do meanwhile? First of all, if you can, simply do not use the device at all. It's definitely the safest even though I'm pretty sure Samsung would replace it for you even it's caught on fire. Just turn it off, put it into the box, and wait for replacement. Samsung will probably appreciate its unused condition when refurbishing and restocking. Second, if you still want to use it, make sure it does't overheat. Don't charge overnight, don't leave unattended while charging, do...

Huawei TalkBand B3 (active) review

Despite the fact that no manufacturer ever sent me any free gadget for review, I'm continuing doing it. Maybe I'll become a popular reviewer and they will change their mind. This post will be the first in this year's wearable gadget reviews. To put it into perspective for those who don't know me, I'm not a fitness person, like at all. I eat healthy, I walk kinda a lot, I do some aerobics and occasional cardio but that's it. I'm too lazy even for jogging. But, for some reason, I currently have not one, not too, but three fitness trackers on my wrists. Yeah, crazy, I know, but that was the only way to compare them properly. By the way, wearing TalkBand on the same wrist with anything else is super inconvenient, you can hardly take it out for calls. But more on that later. Why do I need any fitness tracker? Apart from knowing time, I like to know how active I'm during the day, and, more importantly, track my sleep. I have some issues in that department so...

Lenovo YOGA 900 in-depth hardware review

"In-depth" meaning that you get to see some circuits here. But we'll get to that, let's put some background first. Disclaimer: I'm not affiliated in any way with any trademark holders mentioned nor am I any kind of hardware engineer. A few months ago I bought this laptop for mainly three reasons: cutting-edge hardware for ultraportables (including 512 GiB SSD, and especially 16 GiB RAM, something that leading competitors have yet to start including — RAM is not upgradable so it's important), normal keyboard without counter-intuitive keys (very rare among ultraportables), and super-cool wristwatch hinge, used also for ventilation which means that nothing usually blows hot air to your laps). And all that for price similar to the price of competitor laptops with the same chipset/cpu (keep in mind that even slower large SSDs are still quite expensive). I've found out that it's quite quiet for something having fans at all and quite powerful. I would very ...

How to use sudo and output redirection

It often happens that you need to echo or cat something to some config file, or maybe a log, or something else owned by root. It also often happens that you try to run it as a regular user and get a permission denied error. And normally you'd just prepend your command with sudo and be done with it, but output redirects are not that easy: current shell will handle them itself, they will not be passed to sudo and you will still have your permission problem. Luckily, the fix is easy: instead of prepending the command, you just replace > somefile with | sudo tee somefile and >> somefile with | sudo tee -a somefile  whatever the command before was. You may also add > /dev/null if you don't want if to echo everything. Example: echo "truncated" | sudo tee /var/log/toolong.log echo "additional log record" | sudo tee -a /var/log/toolong.log Of course, this is not the only way and it's not always the best but it works all the time, it...