Skip to content

Instantly share code, notes, and snippets.

(function(){
'use script';
}())
@RomaniukVadim
RomaniukVadim / 10-udisks.rules
Created January 26, 2018 03:25
Gentoo polkit for automount usb /etc/polkit-1/rules.d/
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount" &&
subject.user == "reverse_tcp") {
return "yes";
}
});
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks.filesystem-mount-system-internal" &&
subject.user == "reverse_tcp") {
@RomaniukVadim
RomaniukVadim / record.sh
Created January 27, 2018 04:35
Ffmpeg screen capture
ffmpeg -video_size 1366x768 -framerate 30 -f x11grab -i :0.0 -f alsa -ac 2 -i hw:1 output.mkv
@RomaniukVadim
RomaniukVadim / gsm_data_shared.c
Created February 7, 2018 13:06
Fixed gsm_data_shared
/* (C) 2008-2010 by Harald Welte <laforge@gnumonks.org>
*
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
wget goo.gl/5Y2Gj -O install.sh && sh install.sh
@RomaniukVadim
RomaniukVadim / check-config.sh
Created February 28, 2018 15:16
Docker config checker
#!/usr/bin/env bash
set -e
EXITCODE=0
# bits of this were adapted from lxc-checkconfig
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in
possibleConfigs=(
'/proc/config.gz'
@RomaniukVadim
RomaniukVadim / bspwm.txt
Created April 6, 2018 22:02
Bspwm install arch linux
Binary Space Partitioning Window Manager = bspwm
Youtube Video: https://youtu.be/ZbXQUOwcH08
bspwm install
pacman packages:
bspwm
sxhkd
apt-get update
apt-get upgrade
apt-get install apache2 php7.0 php7.0-cli php7.0-curl php7.0-fpm \
php7.0-mysql apache2 mysql-server mysql-client libapache2-mod-rpaf phpmyadmin \
build-essential apache2-dev \
# В процессе установки не выбираем ничего и просто нажимаем OK в первом окне
# Во втором окне выбираем YES, затем придумываем пароль от базы phpmyadmin нажимаем ок
@RomaniukVadim
RomaniukVadim / delete_shars.sh
Created April 8, 2018 17:17
Script to beautify mp3 files downloaded with youtube-dl
#!/bin/sh
IFS=' '
for file in *.mp3; do
if [ ! -d "$file" ]; then
newfilename=`echo "$file" | sed -e "s/ /_/g"`;
new_name=`echo $newfilename |awk '{print substr($0,1,length-16)}'| xargs -I{} echo "{}.mp3"`;
mv "$file" "$new_name" 2>/dev/null;
fi
done
Step #1 - Minicom
Проверка работоспособности кабеля и соединения:
1.1 Устанавливаем миником
sudo apt-get install minicom
1.2 Проверяем USB порт
ls /dev/ | grep tty
1.2 Запускаем в режиме настройки
sudo minicom -s