Dec 21 2018

Wrong time when booting Linux Mint and Windows 10

timedatectl set-local-rtc 1
Dec 20 2018

Windows 8 – Instalacja bez klucza

Otwieramy pendrive instalacyjny z systemem ,wchodzimy do katalogu Sources i tworzymy plik ei.cfg

W plik ei.cfg wpisujemy:

(dla wersji Windows 8 Pro)

[EditionID]
Professional
[Channel]
Retail
[VL]

Dla zwykłego Windows 8 wpisujemy:

[EditionID]
Core
[Channel]
Retail
[VL]

Nov 16 2018

nvidia on linux – new kernel

If you installed a new kernel, it is possible to even reconfigure the kernel module with the new driver. To do this, run the following command in the terminal:

sudo dpkg-reconfigure nvidia-390

Sep 14 2018

force debug on CakePHP

add forceEnable config into your config/bootstrap.php

if (Configure::read('debug')) {
    Configure::write('DebugKit', ['forceEnable' => true]);
    Plugin::load('DebugKit', ['bootstrap' => true]);
}

in config/app.php
in option "Datasources": create new sub option like this:
'debug_kit' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Mysql',
        'persistent' => false,
        'host' => DB_HOST,
        'port' => DB_PORT,
        //'port' => 'non_standard_port_number',
        'username' => DB_ACC,
        'password' => DB_PASS,
        'database' => DB_NAME,
        //'encoding' => 'utf8mb4',
        'timezone' => 'UTC',
        'flags' => [],
        'cacheMetadata' => true,
        'log' => false,'quoteIdentifiers' => false,
        'url' => env('DATABASE_URL', null),
    ]
upgrading debugKit
composer require --dev cakephp/debug_kit "~3.16.6"

loading debugKit
bin/cake plugin load DebugKit

Jul 19 2018

Certbot free SSL certs

For apache

sudo certbot –authenticator webroot –installer apache –webroot-path <path to served directory> -d <domain>

0 0,12 * * * /opt/certbot/bin/python -c ‘import random; import time; time.sleep(random.random() * 3600)’ && /usr/bin/certbot renew -q

just get a certificate with apache running

sudo certbot certonly --apache

just get a certificate (stop apache first)

sudo certbot certonly --standalone

just get a certificate on Slackware

sudo certbot certonly --apache --apache-server-root /etc/httpd --apache-vhost-root /etc/httpd/sites-enabled --apache-challenge-location /etc/httpd -d rotmanka.pl,www.rotmanka.pl

revoke a cetificate

sudo certbot revoke --cert-path /etc/letsencrypt/live/rotmanka.pl/fullchain.pem

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Would you like to delete the certificate(s) you just revoked, along with all
earlier and later versions of the certificate?

(Y)es (recommended)/(N)o:

Sep 30 2017

Raspberry

  • sudo aptitude install debian-keyring debian-archive-keyring
  • Modify the file /etc/apt/sources.list – change “wheezy” to “jessie” in the first line, so it reads “deb
  • http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi”

  • Modify the file /etc/apt/sources.list.d/raspi.list – change “wheezy” to “jessie” in the first line and add “ ui” to the end of that line, so it reads “deb http://archive.raspberrypi.org/debian jessie main ui”
  • Create the directory /home/pi/.config/autostart by typing “mkdir /home/pi/.config/autostart” in a terminal. (Note the . in front of config.)
  • Type “sudo apt-get update” in a terminal to update the apt index files.
  • Type “sudo apt-get dist-upgrade” to start the upgrade process – this will take a couple of hours. Whenever prompted to update a file during this process, choose the Y option to accept the new file; if you don’t want to be bothered with these prompts, then call apt-get with the -y option – “sudo apt-get -y dist-upgrade”.
Jul 22 2016

postfixadmin – zmiana hasła administratora

doveadm pw -s MD5-CRYPT -p password | sed 's/{MD5-CRYPT}//'
update admin set password=’CRYPTED PASSWORD’ where username=’USERNAME’;

Sep 4 2015

Bitdefender Security for Virtualized Enviroments

Bitdefender Security for Virtualized Enviroments
default login: root
default password: sve
setup command: sva-setup
communication server: ip address:8443
update server configuration: ip:7076

Feb 26 2015

gammu sending sms

gammu sendsms TEXT 048123456789 -text "Halooo .."

Feb 20 2015

If your SSL certificate was received in DER format, here is the command to convert it to PEM:

openssl x509 -in signed_cert.der -inform DER -out server.crt