Discoveries of the Month – November/2016

Wow! My second DotM post!
Turns out that the biggest discovery of this month is that NaNoWriMo is not easy at all. Next year I will prepare myself and try again.
Well, let’s get to the point of the post:

Web Development

Microjs: A selection of small footprint JavaScript micro-libraries and micro-frameworks for all sort of things.

Tech

PythonTutor: Visualize your code in execution, kinda like a debugger. It now has support to Python, Java, JavaScript, TypeScript, Ruby, C, and C++. Fun project and may help you understand how programming languages work.
Detexify: Struggling to find a symbol for LaTeX? Just draw it!

Music

Paranoia: Crossover/Thrash Metal band from the late eighties. They released just one album though.
Hellbenders: Stoner rock band from Goiânia/Brazil.
My Life with the Thrill Kill Kult: Industrial rock band from the late eighties. Been listening to industrial since my teenage years and, strangely, never heard of them before.
Eloy: (German) Progressive Rock band. Underrated in my opinion.
Shackles: Death/Thrash Metal band perfect for headbangin’. It’s a shame they split up.
Electric OctopusPsychedelic/Jazz/Experimental… there is not enough genres to tag these guys.
Brunt: Instrumental stoner rock with a mix of trippy clean tones and heavy fuzz guitars.
Lee Van Cleef: (not to be confused with Lee Van Cleef) Psychedelic acid rock from Italy.
Sasquatch: Another stoner rock band. Great sound and they are really a bastardized version of GFR as they claim. Should be on the regular playlist of any fan of the genre.

YouTube Channels:

The Art of Weapons: An U.K. teenager run this channel since he was around 13 years old. Focused on crossbows and slingshots, but has a lot of DIY information for HDPE plastic, wood lathe and even forging aluminium.
Stoned Meadow of DoomChannel posting albums from underground stoner/sludge/doom bands. Some of the bands presented here I found on the channel.

Free SSL/TLS Certificates with Nginx and Let’s Encrypt

As you might have already noticed, I am now running this site with a SSL certificate provided by Let’s Encrypt. Formerly only enabled to another domain hosted here.

For those who don’t know Let’s Encrypt, it’s a free automated, and open certificate authority. You can literally have a SSL certificate on your hosting in minutes.

You can easily install it with the following instructions. Keep in mind that the instructions are for Ubuntu 14.04, so some steps may differ.

Install Let’s Encrypt client.

Download the script and make it executable:

cd /usr/local/sbin
sudo wget https://dl.eff.org/certbot-auto
sudo chmod a+x /usr/local/sbin/certbot-auto

Check your package manager for letsencrypt. Ubuntu 16.04 already have it.

Obtain the certificate.

To generate the certificate the client will create a temporary file on your webroot. You need to allow the access to the file adding the following to your nginx server block configuration:

location ~ /.well-known {
                allow all;
        }

After that, restart your nginx and run the following command:

certbot-auto certonly -a webroot --webroot-path=/var/www/yourwebroot -d yourdomain.com -d www.yourdomain.com

Don’t forget to change your webroot-path and your domain. If needed, add any other sub domain after the -d yourdomain.com. At the prompt insert your e-mail and, after read, accept the agreement.

You will end up with a set of four .pem files.

Set up nginx with SSL.

Edit your nginx configuration file again, you may now remove that .well-knowmentioned earlier. Also remove the listen 80 portion.

listen 443 ssl;
#listen 80; 
server_name www.yourdomain.com yourdomain.com; 
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; 
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

To redirect all your http traffic to https you should add this server block before the above:

server { 
    listen 80; 
    server_name www.yourdomain.com yourdomain.com; 
    return 301 https://$host$request_uri; 
}

Restart nginx again and test to make sure everything is working as expected.

Set up auto-renewal.

The certificate expires within 90 days, you can run the command certbot-auto renew to perform the renewal of the certificate. However, it will only renew if it’s 30 days away or less to expire. So you can create a cronjob to run every week without any problem.

Edit your crontab and insert the following entries:

30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log
35 2 * * 1 /etc/init.d/nginx reload

A log of the output of certbot-auto renew will be available in the path shown above.

Conclusion:

Easy to install and maintain. You can also improve it using a strong encryption.

Modifying my cheap guitar – Part I – The Wiring

friend lend me his electric guitar for quite a while when I determined to learn a string instrument. After a lot of months I finally got my act together and bought a cheap an inexpensive electric guitar bundle(with a 15-Watt amplifier, gig bag and strap).

After a period of time it occurred to me to experiment, modify and change some aspects of the guitar wiring. All the applied modifications were found over the internet and, as you can imagine, there is nothing innovative.

Modifications:

  1. Switch between the original tone capacitor and a new one.
  2. Hard clipping using two diodes connected in antiparallel.
  3. Neck ON Switch (David Gilmour wiring).
  4. Treble bleed mod.

Motivation

It was a cheap guitar, however its value reflects its quality. I was a bit unsatisfied with its tone, with a little research I found out some ways to improve the tone.

Schematics and part list

guitar-wiring

C1 - 0.002uF / 2nF / 2000pF
C2 - 0.047uF / 47nF / 47000pF (original film capacitor)
C3 - 0.1uF / 100nF / 100000pF (ceramic capacitor)
D1,D2 - 1N5819
R1 - 100k Ohms resistor
SW - DPDT

Switch between the original tone capacitor and a new one

Simple selector between two capacitors. The second one helps to get a darker sound and not so strident like Stratocasters usually are.

Hard clipping using two diodes connected in antiparallel

Sometimes called as “passive distortion” or even wrongly as “passive overdrive”, it’s a fun modification. Gives a harsh sound, but loses volume since it clips the sound without any boost.

Neck ON Switch (David Gilmour wiring)

This wiring, when enabled, connect the neck pickup with whatever selection in the 5-way switch. David Gilmour may be the most famous musician to use this mod. Now with up to 8 possible combinations, the guitar has so much possibilities. In my opinion, the sound is colorful now.

Treble bleed mod

When you turn the volume down on a guitar you can feel that the sound loses a bit of treble. It happens because the pickup, the volume potentiometer and the capacitance in the cable act as a low pass filter. To compensate this loss we “bleed” more treble into the signal as the volume is turned down.

Further modifications

After all that, I ordered and installed a hotrail pickup in the bridge position. Unfortunately I don’t have any pictures, but If I did it again today I would use the Gilmour/neck mod with the bridge pickup instead of neck. I customized the pickguard with an artist, that being the subject of the Part II of this post.

Conclusion

guitar-guts-and-componentsI learned a lot in the process. From something stupid like how a 5-way switch works to something unexpected like fixing to a stripped screw hole.