Skip to content

Instantly share code, notes, and snippets.

View vavrecan's full-sized avatar

Marek Vavrecan vavrecan

View GitHub Profile
@vavrecan
vavrecan / install.sh
Last active June 3, 2024 11:42
clear linux install
# scalling
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
# disable indexing
tracker-preferences
# configure crypt in settings
luksOpen /dev/... home_crypt
# /etc/crypttab
home_crypt UUID=...-....-....... none luks
@vavrecan
vavrecan / settings.json
Last active March 6, 2024 11:00
VSCode settings
{
"window.zoomLevel": 0.7,
"terminal.integrated.fontFamily": "'Noto Mono', 'monospace', monospace",
"terminal.integrated.fontSize": 12,
"terminal.integrated.lineHeight": 1.2,
"editor.tabSize": 4,
"editor.fontFamily": "'Noto Mono', 'monospace', monospace",
"editor.fontSize": 11,
"editor.lineHeight": 1.6,
"editor.letterSpacing": 0.4,
disable core dump:
/etc/security/limits.conf
* hard core 0
* soft core 0
/etc/sysctl.d/9999-disable-core-dump.conf
fs.suid_dumpable=0
kernel.core_pattern=|/bin/false
---
[Unit]
Description=AutoSSH tunnel service
After=network-online.target ssh.service
[Service]
User=root
Restart=always
ExecStart=/usr/bin/autossh -M 0 -q -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" admin@myip -R 2222:localhost:22
ExecStop=/usr/bin/killall -9 autossh
@vavrecan
vavrecan / server
Last active November 24, 2020 21:01
Server setup 2020
/etc/security/limits.conf
#<user> <type> <item> <value>
* soft nofile 1048576
* hard nofile 1048576
root soft nofile 1048576
root hard nofile 1048576
/etc/sysctl.conf
net.ipv4.ip_local_port_range = 12000 65535
1. resend all rides to your email throught app (manual clicking but not so bad)
2. in gmail, go to settings and disable conversation mode view
3. select all emails from bold and right click to send as attachement
4. send this email to yourself
5. download all attachements
6. (optinal) revert settings in step 2.
download invoices using bash:
for f in * ; do
URL=`grep -roh "$f" -e 'https:\/\/invoice.taxify.eu\/[^"]*'`
<scheme name="Darcula Awesome" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2018-10-19T14:10:28</property>
<property name="ide">PhpStorm</property>
<property name="ideVersion">2018.2.2.0.0</property>
<property name="modified">2018-10-19T14:10:31</property>
<property name="originalScheme">Darcula Awesome</property>
</metaInfo>
<colors>
<option name="BORDER_LINES_COLOR" value="0" />
@vavrecan
vavrecan / Debian Installation
Last active May 21, 2024 20:08
debian fine tunning
use debian live gnome
> cat /etc/apt/sources.list.d/testing.list
deb http://ftp.debian.org/debian testing main
> cat /etc/apt/apt.conf.d/99defaultrelease
APT::Default-Release "stretch";
apt install firmware-iwlwifi
apt -t testing install gnome-shell
@vavrecan
vavrecan / Linux Screen Capture
Last active October 20, 2018 22:51
capture
$ best Linux screen capture settings of the day
ffmpeg -thread_queue_size 128 -f alsa -i default -f x11grab -isync -r 30 -ac 2 -s 1920×1080 -i :0.0+0,0 -vcodec libx264 -preset veryfast -pix_fmt yuv420p -acodec libmp3lame -ar 44100 -ab 192k -threads 4 -y Desktop.mp4
# vokoscreen app to capture
# Update: w/ VAAPI e.g. for Intel’s QuickSync:
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -thread_queue_size 64 -f alsa -i default -thread_queue_size 64 -f x11grab -isync -r 30 -ac 1 -s 1920×1080 -i :0.0+0,0 -vf ‘format=nv12,hwupload’ -threads 8 -aspect 16:9 -b:v 12500k -vcodec h264_vaapi -af “lowpass=f=7000″ -acodec aac -ab 192k -threads 8 ~/Desktop/`date ‘+%Y%m%d-%H%M%S’.mp4`
# https://rene.rebe.de/2017-06-23/best-video-screen-capture-settings-of-the-day/
# dump database and files
mysqldump -u user database > ~/database.sql
tar -zcvf ~/backup.tar.gz database.sql /var/www/sitefolder
rm ~/database.sql