SSL is in the house! Certbot makes it trivial: https://certbot.eff.org/
Author: Tanner
I bookmark. A lot.
I plan to do a more thorough write-up on my plasma-ball project, but for now here’s the video, some pictures, and a link to the repo.
3D Touch force values in Swift
We’re going to see really cool stuff from this. I was curious if 3D Touch in the new iOS devices provided continuous values, or a few discreet ones (light press, semi press, hard press).
Excitingly, you get a nice float back.
Who’s going to be the first to react to users squeezing their phones in a rage? #canfinallyhitstuffharder
import UIKit
class ViewController: UIViewController {
//@IBOutlet weak var buttonOutlet: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func touchesMoved(touches: Set, withEvent event: UIEvent?) {
let touch = touches.first!
let force = touch.force.description
print(force)
}
}
I recently acquired a couple of the awesome 7″ Raspberry Pi touch screens. They’re great except for one thing – how the heck do you hold it up out of the box?
Some third party manufacturers are selling stands, but can dirt-cheap LEGOs accomplish the same thing? Of course. I cooked this up in a few minutes. Three points support the screen perfectly, and a piece is added behind the USB ports to minimize sliding (though that hasn’t been an issue at all).
A downside to this design is that two USB ports are blocked on this model, but you may not need them at all as in my case.
The Mac Pro gets an SSD part 2!
Welp, that didn’t take long. After installing my new SSD I quickly realized I could do better. Upgrading to SATA III from SATA II for less than $60 was a no-brainer.
Installation couldn’t be simpler either: All I had to do was attach the SSD onto the onboard slot and install the PCIe card. After powering on it booted right up, nothing else required.
The Mac Pro gets an SSD
Six years old, and now running even better: The Mac Pro gets a Samsung 850 Pro 512GB SSD housed in an Icy Dock enclosure.
In hindsight I probably should’ve looked into a PCIe SSD to get higher speeds since my 2009 Nehalem machine has only SATA 2.0. Regardless, I’m loving the boost.
Edit: SATA 3 drive controller ordered!
Today I got curious if I could solve the issue of high-res images being loaded on small screens with responsive design. Here’s my solution via jQuery plugin.
Basically, I’m detecting the max size of the image by looking at its parent container and comparing that with the grid breakpoints. In my example I used Bootstrap, but I don’t see why any other responsive framework wouldn’t work.
I got curious if one could construct emoji URLs…
.htaccess
RewriteEngine On
RewriteRule (.+) index.php?request=$1 [L,QSA]
index.php
$requestArray = explode("/", $_GET['request']);
echo “Welcome to my page about “;
if(urlencode($requestArray[0]) == ‘%F0%9F%90%A8’) echo ‘koalas’;
echo ‘ eating ‘;
if(urlencode($requestArray[1]) == ‘%F0%9F%8D%94’) echo “burgers!\n”;