aboutsummaryrefslogtreecommitdiff
path: root/wiki/scripts.md
blob: cabd288856a0b61a76c57c7ab2fa5e4d8712e2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
layout: page
title: Scripts
permalink: /wiki/scripts
---

This page contains helpful scripts and useful terminal commands.

## Docker

Installing `ghost`


    docker pull ghost
    docker run -d \
        --name ghost-name \
        -e NODE_ENV=development \
        -p 2368:2368 \
        -v $HOME/path/to/ghost/blog:/var/lib/ghost/content \
        ghost:alpine


## `ffmpeg` to MP4


    ffmpeg -i input_filename.avi -c:v copy -c:a copy -y output_filename.mp4


## Mount USB HDD via CLI


    mkdir /media/usb-drive
    mount /dev/sdX /media/usb-drive/


## Fix screen tearing


    sudo vim /etc/X11/xorg.conf.d/20-intel.conf


Add the following contents to `20-intel.conf`:


    Section "OutputClass"
        Identifier  "Intel Graphics"
        MatchDriver "i915"
        Driver      "intel"
        Option      "DRI"       "3"
        Option      "TearFree"  "1"
    EndSection


## Enabling "tap to click"


    sudo micro /etc/X11/xorg.conf.d/30-touchpad.conf


Add the following contents to `30-touchpad.conf`:


    Section "InputClass"
        Identifier "touchpad"
        Driver "libinput"
        MatchIsTouchpad "on"
        Option "Tapping" "on"
        Option "TappingButtonMap" "lmr"
    EndSection


## Woocommerce

**Reset all product menu_order to `0`**


    UPDATE wp_posts SET menu_order = 0 WHERE post_type = 'product';