Installing pyenv with missing openssl

April 4, 2024

LDFLAGS=”-Wl,-rpath,/home/ec2-user/openssl/lib” \
CONFIGURE_OPTS=”-with-openssl=/home/ec2-user/openssl” \
pyenv install -v 3.10

Reset mysql root password

March 14, 2024

Mysqld complains

  1. mkdir -p /var/run/mysqld
  2. chmod 777 /var/run/mysqld/
  3. sudo -u mysql /usr/sbin/mysqld –skip-grant-tables
  4. In another window: sudo mysql -u root <<!
  5. flush privileges;
  6. ALTER USER ‘root’@’localhost’ IDENTIFIED WITH sha256_password BY ‘password’;
  7. !
  8. Kill the mysqld process

sudo mysql -u root

Thunderbird has problems logging into hotmail

December 1, 2020

See recommended answer here:

https://support.google.com/mail/thread/4528103?hl=en

Replace unicode character in vi

December 14, 2018

Search for backslash-percent-u-2013

2013 is the hex unicode value

ga in command mode will give you the unicode value

Set user password in django manually

July 26, 2018

User.set_password()

Building Zope2 on CentOS

June 26, 2018

When building Python2 need to add -fPIC to CFLAGS

Painless way to install letsencrypt certificates

December 12, 2017

First make sure it works with staging env

sudo certbot certonly --manual --staging

Then you can do the real thing

sudo certbot certonly --manual

This will generate 4 files in /etc/letsencrypt/live/<domain-name> which are links to files in /etc/letsencrypt/archive/<domain-name>

These files need to be moved to the target system.

In the nginx conf file you need to say:

server {
server_name your-domain;
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/your-domain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain/privkey.pem;

location ….
}

How to make Startup disk for Windows on Ubuntu 16.04

December 11, 2017

Ubunu’s Startup Disk Creator is useless.

WoeUSB (offshoot of WinUsb) is good. Includes a GUI.

Building nginx with https support on MacOS

October 4, 2017

Turned out to be trickier than expected.

First need to install openssl. Using brew. Had to install brew itself.

See https://www.howtogeek.com/211541/homebrew-for-os-x-easily-installs-desktop-apps-and-terminal-utilities/

Then:
$ brew install openssl

Installs under /usr/local/opt

Check with:

$ /usr/local/opt/openssl/bin/openssl

Then

$ ./configure –with-http_ssl_module –with-openssl=/usr/local/opt/openssl

Now executing make failed. It seems to look for a .openssl folder which did not exist.

So:

$ cd /usr/local/opt/openssl
$ ln -s   .     .openssl

Now running make gives an error while attempting to make ssl.h. But ssl.h already present. WTF?

So edit the Makefile in objs folder.

$ vi objs/Makefile

Then comment out the parapraph which provides the rules to make ssl.h

# /usr/local/opt/openssl/.openssl/include/openssl/ssl.h: objs/Makefile
# cd /usr/local/opt/openssl \
# && if [ -f Makefile ]; then $(MAKE) clean; fi \
# && ./config –prefix=/usr/local/opt/openssl/.openssl no-shared \
# && $(MAKE) \
# && $(MAKE) install_sw LIBDIR=lib

Now make works. So:

$ make install

 

Why I want to join Toptal’s Web Freelancers Group

July 7, 2017

Recently came across this great article about a programmer’s quest to join the elite freelancing programming community. Needless to say, I was impressed by Carlos’s single-minded objective and how he went about executing the steps needed to accomplish it.

As someone with considerably more experience than Carlos, now I feel possessed by the same challenge. Having been a developer, an architect, a trainer and the CTO, my exposure to the industry best practices and various hurdles that keep from their adoption should in theory help me make the cut. As also someone who is eager to learn and work with the best, this makes me doubly motivated to be a member of this team.

Have started the process. I just got started with the Coding Challenges. Will keep you updated on my progress!