Skip to content

Instantly share code, notes, and snippets.

@quyenlv
quyenlv / install-kdenlive-adobe-premeire-like.rst
Last active November 27, 2019 02:26
Install free video editing application Kdenlive, alternative to Adobe Premeire.

Installation

# Install Plasma package to support color configuration
sudo apt-get install plasma-workspace plasma-desktop

# Install Kdenlive
sudo apt-get install kdenlive
@quyenlv
quyenlv / install-node-npm.sh
Created September 25, 2019 06:24
Install node and npm without having "sudo" permission
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl -L https://www.npmjs.org/install.sh | sh
@quyenlv
quyenlv / install-ostinato-0.9.rst
Last active June 18, 2019 07:26
Install Ostinato v0.9 on GNU/Linux

Prerequisites

Ostinato v0.9 has the following dependencies:

  • QT 4.3+ (but not Qt5.x)
  • Protocol Buffers 2.3+ (bug not 3.x)
  • libpcap

Install Prerequisites

@quyenlv
quyenlv / aix-ls
Last active March 7, 2019 19:51 — forked from earonesty/aix-ls
ls --color support for systems that don't have it, like AIX, and when you don't want to install gnu
#!/usr/bin/perl
use strict;
use Getopt::Long qw(:config pass_through no_ignore_case bundling);
my $do_color;
GetOptions("colors"=>\$do_color);
my @buf;
@quyenlv
quyenlv / tacacs-plus-launch.rst
Last active May 17, 2024 09:30
Very basic steps to try TACACS+.

Installation

Install tacacs+ server:

sudo apt-get install tacacs+

Install tacacs+ client:

@quyenlv
quyenlv / ssh-passwordless-login.md
Last active July 1, 2020 06:34
Automated and passwordless SSH logins

Create the RSA Key Pair

ssh-keygen -t rsa

Copy the public key to a server

ssh-copy-id user@server
@quyenlv
quyenlv / encode-video-ffmpeg.md
Last active January 15, 2019 08:13
Encode video using ffmpeg.

Encoding

Encode video for uploading to Youtube/Vimeo. The output should be a similar quality as the input and will hopefully be a more manageable size.

ffmpeg -i input.avi -c:v libx264 -preset slow -crf 18 -c:a copy -pix_fmt yuv420p output.mkv

Same as above, but also re-encode the audio using AAC instead of stream copying it:

ffmpeg -i input.mov -c:v libx264 -preset slow -crf 18 -c:a aac -b:a 192k -pix_fmt yuv420p output.mkv
@quyenlv
quyenlv / config-port-forwarding-simple.md
Last active September 3, 2019 15:01
Simplest port forwarding configuration using the common tool "socat".

Just using this one-music-note command

sudo socat TCP4-LISTEN:12345,fork TCP4:192.168.1.2:56789

Or with UDP port:

sudo socat UDP-LISTEN:161,fork UDP:10.72.211.141:161
@quyenlv
quyenlv / config-port-forwarding-linux.md
Last active January 9, 2019 10:53
Simple port forwarding configuration
@quyenlv
quyenlv / remote-capture-packet-simple.rst
Last active April 24, 2024 09:24
Remote capturing packet with tcpdump and wireshark.

Topology

+------------------+                    +----------------------+
|   Local host     |  tcpdump over ssh  |    Remote Host       |
|                  |--------------------|                      |\ eth0
| +--------------+ |--------------------|                      |/
| |   Wireshark  | |                    |  tcpdump -i eth0...  |