12
Sep
2017

LibreOffice Calc Hints

12 Sep 2017

How to swap a column in Calc:

Select column B

Click anywhere in the highlighted area and drag the column. The mouse pointer should change to show the drag operation.

Before you release the mouse button, also press the Alt key. When the mouse pointer is at the left side of column A, release the mouse button.

Column B should be moved to the left of column A so that A and B are switched.

8
Sep
2017

PhpStorm

08 Sep 2017

Hotkeys

Ctrl + ]           goto next bracket
Ctrl + Shift + ]   select all for next bracket
Ctrl + Shift + M   jump before or after closest bracket
ALT + Up | Down    next function
ALT + Home         breadcrumbs

Live templates

7
Sep
2017

Nginx Application Server

07 Sep 2017

Laravel

location / {
    proxy_pass       http://127.0.0.1:8300;
    proxy_redirect   http://127.0.0.1:8300/ /;
    proxy_read_timeout 60s;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
6
Sep
2017

Message reminder

06 Sep 2017

vi /path/to/message.sh

#!/bin/bash
PID=$(pgrep gnome-session)
dbus=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
export DBUS_SESSION_BUS_ADDRESS=$dbus
notify-send -u critical "$1"

crontab:

0 * * * * /path/to/message.sh "my message"

19
Aug
2017

Ubuntu Service Autostart

19 Aug 2017

vi /etc/systemd/system/mongodb.service

[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
15
Jul
2017

Install Xdebug for PHP Ubuntu

15 Jul 2017

Prepare to install:

apt install php7.0-xdebug
php --version

Find xdebug path (latest by year):

find / -name 'xdebug.so' 2> /dev/null

Config update vi /etc/php/7.0/fpm/php.ini:

12
Jul
2017

screen

12 Jul 2017
    screen -ls
    screen -dmS mytabname php artisan dosomething
    screen -r mytabname

    detach:
    ctrl+a , d

    ls -laR /var/run/screen/
12
Jul
2017

DisplayLink Ubuntu

12 Jul 2017
  1. Install drivers (http://support.displaylink.com/knowledgebase/articles/684649-how-to-install-displaylink-software-on-ubuntu)

  2. Disable secure boot

  3. Create file:

    $ vi /usr/share/X11/xorg.conf.d/10-intel.conf

Paste This:

    Section "Device"
        Identifier  "Intel"
26
May
2017

Simple mail server

26 May 2017

Before installation

mysite.com MX record points to mysite.com

Step 1

Need to do https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04

Step 2

17
May
2017

After Hacking

17 May 2017
tail /var/log/auth.log
find . -type f -newermt 2017-01-01 ! -newermt 2017-01-31

grep -lr --include=*.php "base64_decode"
grep -lr --include=*.php "@require"