Skip to content

Instantly share code, notes, and snippets.

@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 / ffmpeg.md
Last active May 22, 2024 17:20
Usefull ffmpeg commands

Usefull ffmpeg commands

General options

List codecs

ffmpeg -codecs | grep -i sub

Quiet output:

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

@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 / 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 / fortigate.md
Last active April 18, 2024 05:31
Usefull Fortigate CLI commands
get sys perf status

diag test app scanunit 3

diag stat app-usage-ip Facebook

Monitor bandwidth usage per IP address

@cetinajero
cetinajero / ssh.config
Last active January 19, 2024 17:43
~/.ssh/config
host paunix.github.com
hostname github.com
identityfile ~/.ssh/id_rsa-paunix
host 172.31.31.254 172.31.35.254 172.31.43.254
port 2002
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +3des-cbc
HostKeyAlgorithms +ssh-dss
MACs hmac-sha1
@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 / macos_boot_keys.md
Last active May 15, 2024 21:48
macOS Boot combination keys and bootable USB commands
@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]