Skip to content

Instantly share code, notes, and snippets.

View m4rc377's full-sized avatar

Marcell Aldhi m4rc377

  • inside women's pants
View GitHub Profile
@m4rc377
m4rc377 / unison.md
Created October 17, 2024 10:49 — forked from asksven/unison.md
Configure unison for continuous sync

Configure unison for bi-directional sync

1. On client

  1. Create a profile (~/.unison/bidirsync.prf):
# Unison preferences
label = bi-directonal sync with server
root = /home/<user>/git
root = ssh://<user>@<server-name>//home/<user>/sync/git
sshargs = -oIdentityFile=/home/<user>/.ssh/<privkey-name>
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@m4rc377
m4rc377 / peazip_content-menu.sh
Created January 13, 2024 09:58
Add Peazip Context menu on Ubuntu (nautilius)
cp -v /usr/share/peazip/batch/freedesktop_integration/Nautilus-scripts/Archiving/PeaZip/* $HOME/.local/share/nautilus/scripts
@m4rc377
m4rc377 / rclone_service_generator.sh
Last active January 11, 2024 19:00
simple service generator for rclone
#!/bin/bash
#config
generated_location="."
generated_system_location="/etc/systemd/system"
prefix="rclone"
if [ "$EUID" -ne 0 ]; then
echo "Please run with sudo"
exit
@m4rc377
m4rc377 / throttled.sh
Created November 26, 2023 15:32
script for check raspberry undervoltage & throttled or capped
#!/bin/bash
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling
#Flag Bits
UNDERVOLTED=0x1
CAPPED=0x2
THROTTLED=0x4
HAS_UNDERVOLTED=0x10000
HAS_CAPPED=0x20000
@m4rc377
m4rc377 / goinstall.sh
Last active November 26, 2023 17:49
Simple script automatic Instalation Golang.
#!/bin/bash
ver=1.21.4
version=go$version
if [ -d ~/.gvm ]; then
echo "Directory exist. Please remove it."
exit 0;
fi
@m4rc377
m4rc377 / x11vnc_script.sh
Last active June 27, 2023 20:10
simple script for install vnc server
#!/bin/sh
# install x11vnc
apt install -y x11vnc
# add service
cat <<EOF >> /lib/systemd/system/x11vnc.service
[Unit]
Description=x11vnc service
After=display-manager.service
@m4rc377
m4rc377 / composer-alternatives.sh
Last active October 29, 2024 12:39
This script for add and installing multiple composer with different version and add to alternative list. tested on ubuntu 22.04 and and might work for Debian derivatives.
#!/bin/bash
clear
## Location Destination
# /usr/bin
# /usr/local/bin
dest="/usr/local/bin"
apt -y install composer
@m4rc377
m4rc377 / git-reset-author.sh
Created March 10, 2023 18:49 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@m4rc377
m4rc377 / gist:d9179af4e2bd90bacafb280f7dcc8fac
Created January 15, 2023 03:42
Find Broken Shorcut Menu Ubuntu
### https://askubuntu.com/a/44303
for i in {/usr,~/.local}/share/applications/*.desktop; do which $(grep -Poh '(?<=Exec=).*?( |$)' $i) > /dev/null || echo $i; done