Skip to content

Instantly share code, notes, and snippets.

View adrianbiro's full-sized avatar

Adrián Bíro adrianbiro

View GitHub Profile
@adrianbiro
adrianbiro / Show_IMEI_number_android.md
Created December 26, 2022 12:57
Show IMEI number

To show IMEI, ICCID and SN on android.
Go to phone app and write *#06#

@adrianbiro
adrianbiro / proxmox_stuff.md
Created December 19, 2022 13:50
Proxmox stuff

Remove Proxmox Subscription Notice

sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

Remove enterprise repo to fix update error

sed -i 's/^/#/' /etc/apt/sources.list.d/pve-enterprise.list
@adrianbiro
adrianbiro / sugh.sh
Created December 15, 2022 13:13 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@adrianbiro
adrianbiro / split_substring_awk.md
Created November 25, 2022 14:09
print substring in awk

Pure AWK

BEGIN {
  s="0123456789 11 22"; 
  split(s, arr, " "); 
  print substr(arr[1],2)
}

# 123456789
vim
git
moreutils
pylint
isort
black
golint
shellcheck
ncdu
bc
@adrianbiro
adrianbiro / show_dependecies.sh
Created November 21, 2022 11:35
Show dependencies from all project files
sed -n '/^#include\ .*/p' **/*.c \
| sed -n 's/^#include\ *"\(.*\)"/\1/gp' \
| sort -u
@adrianbiro
adrianbiro / resetGit2InitPruneHist.sh
Created November 14, 2022 12:13
Resetting A Git Repo To An Initial State And Delete Commit History
git pull
git checkout --orphan tmp-main
git add -A
git commit -m 'Initial commit'
git branch -D main
git branch -m main
git push -f origin main
git branch --set-upstream-to=origin/main main
git gc --aggressive --prune=all
git fetch --all

Outlook

Close Outlook rename C:\Users\<User_Name>\AppData\Local\Microsoft\Outlook\<username@example.com>.ost to <username@example.com>.ost.bak

Or create new profile

  • In Outlook, select File > Account Settings > Manage Profiles.
  • Choose Show Profiles > Add.
  • In the Profile Name box, type a name for the profile, and then choose OK.
# If there is just one email account.

cron limited PATH

# env -i SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/home/klara LOGNAME=klara /home/klara/bin/yourscript.sh