Fixing File Permissions from Other Windows Installs

Friday April 22nd, 2016

I’ve had to do this a few times now to get full access to my files back. This has been a sure fire way for me to get my files corrected, because no amount of dicking with the Right Click > Properties > Security crap would work right.

  • The first case was when I updated from Windows 8 to Windows 10 – something had gone fucky with the migration with how I went from Insiders to Upgrading my actual partition, such that it actually created a 2nd user named Bob or some crap.
  • The second case was when I rebuilt my machine using a non-Microsoft account (intentionally) but all my files on my other drive were owned by the Microsoft account which the machine has completely forgotten about.
  • The third case was when my laptop died and I took the drives out and put them in this machine so I could get my data off it.

First thing, click your little Cortana search box and type “cmd” – do not hit enter. Right click it and choose Run As Administrator. Once the prompt comes up…

So putting this in perspective with actual data…

If you were telling yourself “But I have Admin” but were still experiencing permission problems, or if some of your apps were just screwing up and you could not figure out why, chances are they could not access the files. This has corrected it 100% of the time for me.

For me this mostly manifested as Skyrim randomly not loading some of my mods even though everything looked right.

Quick hack to deal with fail Webkit/Blink image blurring

Friday December 18th, 2015

I’m going to skip the classic bitching and moaning I am known for and get right to the meat of it as I have got a shittone more work to do today.

Problem

Chrome (and Chrome based things) fail at dealing with scaled down images so hard. This is pretty funny. Look at this. This is a <div> with a background-image of 300×150 and background-size: cover. This actually looks just fine as you can see:

1

But watch this. Now all I am going to do is add background-position: center center…

2

If you are blind or just really lazy, let me tell you that image is blurry compared to before I centered it.

What the actual hell, it wasn’t even the fact I took a 300×150 shrunk it to a random value that the browser calculated to maintain the aspect ratio you see regardless of available space. It was the fact that I told it to center itself. Whatever, I get it, I understand how scaling interpolation works and its probably caused by shifting the result a fraction of a pixel or something. But it is bad, so lets fix it.

Solution.

But, there is a hack for this… the image-rendering property, which I unceremoniously applied to all the things because screw it and yolo.

 

 Scaled1  Scaled, Centered2
 Scaled, Centered, Hacked.3

Conclusion

The result is actually slightly cleaner than the first scaled too, IMHO. This may seem stupid to people like me (backend engineers) but other people cared enough that I had to deal with it, so here we go.

Our PHP 7 Update

Friday December 4th, 2015

Over the years I got tired of doing custom builds, so I been running off the Ondrej repository for PHP for quite sometime now. Unfortunately I am impatient and Ondrej does not yet have all the things you (and I mean, I) need to actually run a full PHP application. So here is what I had to do to get our server up on 7 using as much as Ondrej as I could, then manually adding Memcached and Imagick support running on Apache, on Ubuntu 14.04 Trusty Whatever.

Preparing and Installing PHP 7’s Core.

This process installed/replaced/updated the already existing PHP on the system that existed from a previous Ondrej 5.6 install. After installing you may have to change permissions on the session storage location. You will know because you will see it in the log.

Without the php-mysql your PDO won’t do jack.

Could not embed GitHub Gist 629150a047027e9a44fb: Bad credentials

Adding Imagick (ImageMagick) to PHP 7.

Of course watch the result from ./configure to see if you are missing any packages and resolve them via apt-get. Don’t forget the -dev version too.

After installing I had to manually add extension=imagick.so to /etc/php/7.0/cli/php.ini.

Could not embed GitHub Gist 629150a047027e9a44fb: Bad credentials

Adding Memcache (MemcacheD, actually).

This required me to update my source. You have to give it the D: new Memcache to new Memcached. API seems to be the same I changed nothing else and it is going.

Of course watch the result from ./configure to see if you are missing any packages and resolve them via apt-get. Don’t forget the -dev version too.

After installing I had to manually add extension=memcached.so to /etc/php/7.0/cli/php.ini

Could not embed GitHub Gist 629150a047027e9a44fb: Bad credentials

Getting Around Sites That Break Right Click

Monday October 26th, 2015

First off, if you run a site that breaks right click (in this blog post the example is Instagram):

Screw you. Moving on.

 

Continue to full post…

Introduction to Nether Input

Monday June 1st, 2015

I learn more by example than by paragraphs of text or minutes of speech. So here is a super short slide deck introducing how to use Nether Input in the most simple way I could craft. You’ll probably want to fullscreen it.

Fixing Windows Explorer’s Slow Ass Green Bar on Network Locations

Wednesday May 27th, 2015

Doesn’t matter how, pick a method. Windows Share browsing, Windows Share Mapping, some form of remote mount like ExpanDrive SSHFSing a remote server as a drive letter. Whichever the case is, by default Explorer will go nuts when it finds a new folder which will manifest as the address bar of the Explorer window turning into a green progress bar, and the window may or may not become non-interactive while you wait for it.

There are two things I did that seemed to have solve it.

Continue to full post…

Validating the new No Captcha reCaptcha in PHP

Thursday May 7th, 2015

Google has released a new nicer looking reCaptcha (finally) but it does not currently have the drag and drop PHP library to match it. Here is what it looks like if you haven’t seen it yet.

captcha2

Also, it ended up being so easy I didn’t even bother to search Packagist for it. So here is how you do it like a boss. Depends on PHP (obviously) and cURL (functionally). I am not going to talk about how to embed it on the site, because when you generate the API key, it tells you right then the 2 lines of HTML to paste to make it show up. This code is for after that.

Continue to full post…

Why is everyone stuck?

Tuesday April 21st, 2015

Everyone has an opinion on things. Honestly, I don’t care what your opinion is. What bothers me is how you generated your opinion.

If you actually really read this post, and still somehow think that I am just ranting about code standards, formatting, or specific software products, then you completely missed the point and I promise it is not going to be worth your time putting your 2 cents in.

  • Tabs vs spaces.
  • PascalCase vs camelCase.
  • Red vs blue.
  • Strict Typing or soft typing.
  • Break-braces or inline-braces.

Continue to full post…

Nexus 7 slow after upgrade to Lollipop?

Thursday March 26th, 2015

After upgrading to Lollipop my N7 was completely useless. It would take MINUTES just to bring up the settings app – and i am not exaggerating for dramatic effect. It was seriously that bad.

It was so slow I just shoved it under the bed and forgot about it for a few weeks. Finally decided to try and figure out what is up, I saw a few posts that suggested to try TRIMing it. Well, let me save you some time now, the N7 doesn’t support TRIM, so don’t waste your time.

HOWEVER…

Continue to full post…

Facebook’s URL sharing is the bane of the internet.

Friday December 26th, 2014

Sharing a link. It sounds so fucking easy, doesn’t it?

I’ve been dicking with this for over a year now. If you try and fight me on this, I will end you.

Problem.

Adding the Share code to your page causes Facebook to prematurely hit your page and cache it even if nobody ever actually clicks share.

Why is this a problem?

Because when a profile is created it has no images. My og:image tag is telling to use the sites logo, but of course Facebook ignores this shit and instead pulls a random image from the web page, usually the QR Code, which is not even visible by default. This is fine, whatever, nobody has even shared that page yet anyway because its brand new.

Continue to full post…

Twitter

 
Coderwall