So I started researching bitcoin mining and the feasibility of doing it with a laptop. The machine in question is a mid-2012 MacBook Pro. From what I have read, it’s not worth mining bitcoins (or any other semi-mature) cryptocurrencies on a MacBook Pro. I don’t think I’m up to the task of buying an ASIC […]
Monthly Archives: January 2014
Screenshot Sharing Script for Mac OS
I recently wanted to move away from commercial screenshot sharing tools (I was using Jing), so I decided to create a script that takes screenshots, allows you to annotate them, then uploads them to my webhost. The host I use is Digital Ocean and I use sftp to upload the image. Here’s the script: That will […]
Get a random file from a directory with the Linux terminal
Here’s how you can grab a random file from a directory using the GNU/Linux terminal: ls | shuf -n 1 And perhaps you want to do something like open that file with a program: I used this to do things like open a random image with feh from my pictures folder: The magic here is […]
Nginx and “413 Entity too large.”
That’s what she said! Okay, okay, here’s how to fix an “entity too large” error with nginx. Add this to your server block: client_max_body_size 10M; where 10M is the size of uploads you want to allow. The default is 2 MB, but as you know people have smartphones that take larger pictures than that now. Just remember […]
Changing the default session in Elementary OS
I installed Elementary OS a few months ago, but moved back to Ubuntu for some reason or another. A couple days ago I decided to give Elementary OS another try. Well, tonight I finally started missing openbox too much and decided to install it and give up on Elementary’s default desktop manager. Once I installed openbox, I […]
SQLite 3 and PHP – “unable to open database file”
While playing with SQLite 3 and PHP, I encountered an oddity: the SQLite database file must be writable AND be in a writable directory. So if you’re running SQLite commands from within a PHP web page, the directory your database is in and the database itself must be writable by your www user. With most […]