Skip to content

Instantly share code, notes, and snippets.

View evasilev's full-sized avatar
🐧

Jenia evasilev

🐧
View GitHub Profile
@evasilev
evasilev / phpstorm.txt
Created October 31, 2017 11:29 — forked from tvlooy/phpstorm.txt
PhpStorm cheat sheet
ctrl + alt + shift + t = refactor this
alt + enter = allerlei shortcuts
ctrl + alt + l = reformat code
shift + f11 = show bookmarks
f11 = insert bookmark
alt + insert = file new
ctrl + n = navigate class
ctrl + shift + n = navigate file
ctrl + shift + f = find in path
ctrl + alt + shift + insert = commit file (eigen shortcut)

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

Ansible - Cheatsheet

ansible-galaxy

Playbook template init with ansible-galaxy

ansible-galaxy init roles/myrole

ansible-playbook

Tmux -Shortcuts & Cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@evasilev
evasilev / CURL - cheatsheet.md
Created February 2, 2018 13:50 — forked from mbodo/CURL - cheatsheet.md
CURL Cheatsheet

CURL - cheatsheet

  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
@evasilev
evasilev / export-vivaldi-settings.sh
Created February 6, 2018 11:16 — forked from mrroot5/export-vivaldi-settings.sh
Export vivaldi settings on Linux.
# We have two options:
# compress in .tar.gz (bigger size) or .7z (about 60% less size).
# .tar.gz
#
tar -czvf vivaldi-settings.tar.gz ~/.config/vivaldi/Default/
# Explanation:
# c: create a new archive
# z: gzip
# v: verbosely list files processed
# f: use archive file or device ARCHIVE
@evasilev
evasilev / tmux-cheatsheet.markdown
Created September 21, 2018 12:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@evasilev
evasilev / gist:ebef7cc2615aa1fb573f1ad024edd2bd
Last active April 19, 2022 18:14 — forked from ingramchen/gist:e2af352bf8b40bb88890fba4f47eccd0
ffmpeg convert gif to mp4, for best cross browser compatibility

Full command line options

ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4

Notie

  • output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS.
@evasilev
evasilev / Git-precommit-hook-mysqldump
Created July 29, 2019 19:05 — forked from mithereal/Git-precommit-hook-mysqldump
Git pre-commit hook for MySQL database backup ( remote mysqldump + Git push )
#!/bin/bash -e
# -e means exit if any command fails
DBHOST=address.to.your.server
DBUSER=username
DBPASS=password # do this in a more secure fashion
DBNAME=DBNAME
GITREPO=/where/is/your/repo
DUMP=$GITREPO/where/you/store/dumps
NEW=$DUMP/schema.sql
OLD=$NEW.old