Skip to content

Instantly share code, notes, and snippets.

has:attachment filename:(-pdf -zip) older_than:3y larger:10m

@cetinajero
cetinajero / config.fish
Created April 2, 2018 14:09
vi ~/.config/fish/config.fish
# sudo bang bang
function sudo
if test "$argv" = !!
eval command sudo $history[1]
else
command sudo $argv
end
end
# git branch
@cetinajero
cetinajero / VMware_ESXi.md
Last active May 18, 2021 15:47
Power On and Power Off VMs in VMware ESXi 5.5 from the command line

Get a list of your VMs

vim-cmd vmsvc/getallvms

Find the one you’re interested in and check its “power” state

vim-cmd vmsvc/power.getstate [vmid]
@cetinajero
cetinajero / plex.md
Last active February 22, 2022 12:21
Usefull commands for Plex

Installation

Enable the package repository for CentOS

Create the file
sudo vi /etc/yum.repos.d/plex.repo
@cetinajero
cetinajero / 1-network-tools.md
Last active July 25, 2022 22:52
Network tools & list of interface bandwidths

SSH Port Forwarding

SSH Port Forwarding, aka SSH Tunneling.

Local Forwarding

Local forwarding is used to forward a port from the client machine to the server machine. Basically, the SSH client listens for connections on a configured port, and when it receives a connection, it tunnels the connection to an SSH server. The server connects to a configurated destination port, possibly on a different machine than the SSH server.

ssh -L <local-listening-port>:<remote-destination-host>:<remote-destination-port> <ssh-server>
@cetinajero
cetinajero / .bash_profile
Last active April 11, 2023 01:39
.bash_profile
alias ll='ls -lahG'
alias lowercase='for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done'
alias apple-wireless-mouse='mouseid=$(xinput --list | perl -n -e 's@.*Edgar Tinajero.*Mouse.*id=([0-9]+).*@$1@ and print') && xinput --set-prop $mouseid 'libinput Natural Scrolling Enabled' 1 && xinput set-button-map $mouseid 1 1 3'
function rdpclient { cat ~/.bash_secrets | grep $1 | awk '{print $NF}' | rdesktop -f -N -x m -u Administrator -p - -r disk:share=$HOME/sap $1 & }
@cetinajero
cetinajero / Netguard v3.0.md
Created June 19, 2023 17:39
Private alternative to DynDns and, thanks to Cloudflare, completely free.

Manage access and permissions for your accounts, sites, and products.

Token name

  • Netguard 3.0 (curl)

Permissions

@cetinajero
cetinajero / chrome-os.md
Last active July 19, 2023 22:25
Get Jekyll to work on Chrome OS using Termux

Steps:

pkg install proot
termux-chroot
pkg install openssh
ssh-keygen -t rsa -b 4096 -C "email@gmail.com"
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
sshd
whoami
ifconfig arc0 | awk '/inet/{print $2}' | sed -e 's/^.*://g'
@cetinajero
cetinajero / MTKLogger export script.bat
Last active September 4, 2023 15:56
MTKLogger export script
adb devices
@echo "Downloading mtklog"
adb pull /mnt/sdcard/mtklog mtklog
adb pull /mnt/sdcard0/mtklog mtklog
adb pull /mnt/sdcard2/mtklog mtklog
adb pull /storage/sdcard1/mtklog mtklog
@echo "Downloading trace"
adb pull /data/anr mtklog/anr
@cetinajero
cetinajero / ffmpeg.md
Last active October 16, 2023 02:16
Usefull ffmpeg commands

Usefull ffmpeg commands

General options

List codecs

ffmpeg -codecs | grep -i sub

Quiet output: