Skip to content

Instantly share code, notes, and snippets.

View salaros's full-sized avatar
🎉
Making magic happen

Yaroslav Zhmayev salaros

🎉
Making magic happen
View GitHub Profile
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists winepak https://dl.winepak.org/repo/winepak.flatpakrepo
# sudo flatpak install -y --user --from https://download.mono-project.com/repo/monodevelop.flatpakref
sudo flatpak install -y --user http://flatpak.uploadedlobster.com/peek-stable.flatpakref
sudo flatpak install -y --user http://feedreader.xarbit.net/feedreader-repo/feedreader.flatpakref
sudo flatpak install -y --user flathub com.axosoft.GitKraken
sudo flatpak install -y --user flathub com.discordapp.Discord
@salaros
salaros / merge_PDFs_custom_size.sh
Created October 14, 2017 14:32
Merge PDFs via GhostScript using custom PDF size and fit to page size, which plays well with business cards and such
gs -q -dPDFFitPage -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-r600 -g3300x1831 \
-sOutputFile=out.pdf \
in_1.pdf in_2.pdf
.flex {
display: flex
}
.flex > .full-height {
flex: 1 1 auto
}
https://sir-sherwin.blogspot.com.by/2012/04/how-to-access-router.html
# TODO use a dedicated backup user, protect gzip file with password etc
echo "/var/backups/all-databases.sql.gz {
daily
rotate 8
nocompress
create 640 root adm
postrotate
mysqldump -uroot --all-databases > /var/backups/all-databases.sql --single-transaction
gzip -9f /var/backups/all-databases.sql.sql
endscript
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
#!/bin/bash
gnomeshell-extension-manage --install --version 3.26 --extension-id 15 # Alternate Alt+Tab (Windows 7 style with thumbnails)
gnomeshell-extension-manage --install --version 3.26 --extension-id 7 # Removable Drive Menu
gnomeshell-extension-manage --install --version 3.26 --extension-id 55 # 55/media-player-indicator
# gnomeshell-extension-manage --install --extension-id 921 # 921/multi-monitors-add-on/
gnomeshell-extension-manage --install --extension-id 118 # 118/no-topleft-hot-corner/
gnomeshell-extension-manage --install --version 3.26 --extension-id 750 # 750/openweather/
gnomeshell-extension-manage --install --extension-id 1218 # 1218/printers/
gnomeshell-extension-manage --install --version 3.26 --extension-id 19 # 19/user-themes/
@salaros
salaros / Makefile
Last active November 13, 2017 00:27
Add Sphinx -> HTML document generation to a PHP project
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
@salaros
salaros / README-Template.md
Created November 20, 2017 00:07 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@salaros
salaros / dism-clean-win-sxs.bat
Last active November 3, 2018 10:11
Clean Up the WinSxS Folder via DISM
:: Removes all superseded versions of every component in the component store.
:: All existing service packs and updates cannot be uninstalled after this command is completed.
:: This will not block the uninstallation of future service packs or updates.
dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
:: Reduces the amount of space used by a Service Pack.
:: The service pack cannot be uninstalled after this command is completed.
dism /online /Cleanup-Image /SPSuperseded