Categories
Technical

Good Practice Programming with David Raleche

Categories
Technical

New Keyboard Das X50Q Soft Tactile

Enjoying my new Keyboard ! Volume control is awesome !

Categories
Technical

SSL ImportError: No module named cryptography

Problem – Let’s Encrypt

[[email protected] ec2-user]# /usr/local/bin/certbot-auto --no-bootstrap
 Creating virtual environment…
 Installing Python packages…
 Installation succeeded.
 Traceback (most recent call last):
   File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in 
     from certbot.main import main
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 2, in 
     from certbot._internal import main as internal_main
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/_internal/main.py", line 10, in 
     import josepy as jose
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/init.py", line 41, in 
     from josepy.interfaces import JSONDeSerializable
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py", line 7, in 
     from josepy import errors, util
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py", line 7, in 
     import OpenSSL
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/init.py", line 8, in 
     from OpenSSL import crypto, SSL
   File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/crypto.py", line 12, in 
     from cryptography import x509
 ImportError: No module named cryptography

Solution

rm -rf /opt/eff.org/*
pip install -U certbot
certbot renew --debug
 certbot
Categories
Technical

How to Compress files tar bz2 ?

Compress bz2

tar -cjvf archive.tar.bz2 stuff

Decompress bz2

tar -jxvf filename.tbz2

Categories
Technical

Best File compression

First, we installed Bastion and compressed its folder — about 863 MB in size of music, graphics, executable files, and various different types of documents:

  • Zip (Windows 8.1): 746 MB (86.4% of the original size)
  • Zip (WinZip): 745 MB (86.3% of the original size)
  • RAR (WinRAR): 746 MB (86.4% of the original size)
  • 7z (7-Zip): 734 MB (85% of the original size)

Next, we compressed Hotline Miami, which is 654 MB of data:

  • Zip (Windows 8.1): 316 MB (48.3% of the original size)
  • Zip (WinZip): 314 MB (48% of the original size)
  • RAR (WinRAR): 307 MB (46.9% of the original size)
  • 7z (7-Zip): 301 MB (46% of the original size)

Categories
Technical

How to collapse swagger tag categories by default ?

Add docExpansion:'true', in the file swagger/index.php

 <script>
    window.onload = function() {
      // Begin Swagger UI call region
      const ui = SwaggerUIBundle({
        //url: "http://davidr3.sbx.4over.com/swagger.json",
        url: "../swagger.json",
        dom_id: '#swagger-ui',
        docExpansion:'true',
        deepLinking: true,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      })
      // End Swagger UI call region

      window.ui = ui
    }
  </script>

Categories
Technical

untar linux compressed file

tar -zxvf yourfile.tar.gz
Categories
Technical

git pull origin master returns fatal: invalid refspec


remove lines below from .git/config[remote “origin”]


        url = [email protected]:dxxxx/xxxxxxxx.git
        fetch = +refs/heads/*:refs/remotes/origin/*

Type following commands

 git remote add origin [email protected]:xxxxxx/xxx.git
 git remote -v
Categories
Technical

PGadmin v4.14 released

Postgres PG admin has been released. Let’s see how it turns out @

Categories
General Operating System Programming Technical

Unix – Composer Issue

Problem

[ErrorException]                                                                          

“continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”?

SOLUTION

#1 composer self-update

#2 composer update