Skip to content

Instantly share code, notes, and snippets.

View aschwinwester's full-sized avatar

aschwinwester

View GitHub Profile
@aschwinwester
aschwinwester / practical-linux-carmen-balan-notes.md
Last active January 19, 2018 07:02
Udemy Learn Linux Administration Through Practical Examples - notes

Notes - Learn Linux Administration Through Practical Examples

Given by teacher carmen balan. These notes are from the course from Udemy. They might contain errors as they are notes. I will update the notes from time to time.

Section 1: System startup

Init vs Systemd

Now new versions of Debian and Debian OS, like Ubuntu, are also using systemd

Init

  • The first daemon process to start
  • pid=1
@aschwinwester
aschwinwester / apt-key-no-valid-openPGP
Last active June 25, 2018 07:21
gpg: no valid OpenPGP data found
# no-check-certificate is needed when behind corporate proxy
wget -q --no-check-certificate -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
@aschwinwester
aschwinwester / visual-code-XHR-Failed.md
Last active June 25, 2018 07:53
Visual code XHR Failed

Visal code XHR failed due to corporate proxy

Due to the corporate proxy Visual code is not able to download Extensions. There are a few steps needed

{
    "http.proxy": "http://127.0.0.1:3128",
    "http.proxyStrictSSL": false
}

You will still get the following Error

@aschwinwester
aschwinwester / docker-cntlm.md
Last active June 25, 2018 10:41
docker cntlm linux

Edit cntlm config

vi /etc/init.d/cntlm

change the following line and add docker

# Required-Start:    $remote_fs $syslog $time $network docker    <-- add docker here

Required-Stop: $remote_fs $syslog $time $network docker <-- add docker here

@aschwinwester
aschwinwester / pyopenssl-error.md
Last active October 2, 2018 08:32
python openssl issue using virtualenv

Python virtual env open ssl error

I am using virtualenv, but noticed that python 2.7 gave an error on pyopenssl outside virtualenv. My company uses an intermediate ssl certificate. My solution of the ssl error was to add that certificate to all pip.conf, outside and inside virtualenv.

 File "/usr/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
umake ide idea-ultimate
@aschwinwester
aschwinwester / sed-ungreedy-regex.md
Last active October 9, 2018 07:29
Example ungreedy regex in sed

Cleaning JSON file

{"description":"OK","responseSchema":{"$ref":"#/definitions/CreditTransfers"},"schema":{"$ref":"#/definitions/CreditTransfers"}},

remove json part from swagger.json file remove the following part

"responseSchema":{"$ref":"#/definitions/Error"},
@aschwinwester
aschwinwester / karma-phantomjs-not-working.md
Created October 10, 2018 14:01
Path must be a string. Received null
WARN [plugin]: Error during loading "karma-phantomjs-launcher" plugin:
  Path must be a string. Received null
...

WARN [launcher]: Can not load "PhantomJS", it is not registered!
  Perhaps you are missing some plugin?

I have installed in node_modules the following:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
@aschwinwester
aschwinwester / python-install-certificates.md
Created November 7, 2018 17:17
Install certificates form python on MacOS

check Python version first

ls -ld /Applications/Python*

output might be something like:

drwxr-xr-x@ 10 root  wheel  320 Oct 27  2017 /Applications/Python 3.6
drwxr-xr-x@ 10 root  wheel  320 Nov  7 06:46 /Applications/Python 3.7

run command with version (latest) to use