Skip to content

Instantly share code, notes, and snippets.

View petrzpav's full-sized avatar
💭
I may be slow to respond.

Pavel Petržela petrzpav

💭
I may be slow to respond.
View GitHub Profile
[
{ "keys": ["shift+escape"], "command": "toggle_terminus_panel", "args": { "cwd": "${file_path:${folder}}" } },
// { "keys": ["ctrl+;"], "command": "terminus_close", "context": [{ "key": "terminus_view" }] },
{ "keys": ["ctrl+e"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+)"], "command": "indent" },
{ "keys": ["ctrl+-"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+ú"], "command": "unindent" },
{ "keys": ["ctrl+/"], "command": "unindent" },
{ "keys": ["ctrl+shift+-"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["alt+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
@petrzpav
petrzpav / cloudSettings
Last active October 13, 2020 13:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-13T13:58:42.326Z","extensionVersion":"v3.4.3"}
@petrzpav
petrzpav / email.sh
Created March 6, 2018 21:49
Bash email function
#!/bin/bash
function email {
local ecode
GLOBAL_CONTENT=${1:-"[Missing message content]"}
GLOBAL_SUBJECT=${2:-"$SCRIPT_NAME Message"}
GLOBAL_TOADDR=${3:-"info@abc.cz"}
GLOBAL_FROMADDR=${4:-"noreply@abc.cz"}
[[ "$GLOBAL_TOADDR" =~ ^$EMAILS_REGEX$ ]] \
|| exception "Invalid TO address $GLOBAL_TOADDR"
@petrzpav
petrzpav / media.ahk
Created August 9, 2017 11:55
AutoHotKey media settings
; -------------------------------------
; MASTER VOLUME CONTROL
; Ovládání globální hlasitosti
; -------------------------------------
^!PgUp::Send {Volume_Up}
^!PgDn::Send {Volume_Down}
^!Delete::Send {Volume_Mute}
; -------------------------------------
; MEDIA CONTROL
@petrzpav
petrzpav / install_nginx.sh
Last active July 13, 2017 13:17
Install Nginx + Google PageSpeed + OpenSSL
#!/bin/bash
NPS_VERSION="1.11.33.4"
NGX_VERSION="1.11.5"
SSL_VERSION="1.0.2j"
wget http://nginx.org/download/nginx-${NGX_VERSION}.tar.gz \
&& tar -zxvf nginx-${NGX_VERSION}.tar.gz \
&& wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip \
&& unzip release-${NPS_VERSION}-beta.zip \
@petrzpav
petrzpav / git_aliases
Created March 22, 2017 08:30
Usefull git aliases
#!/bin/bash
# Usage:
# 1) Download file (e.g. to your $HOME)
# 2) Place the following in your shell configuration file (e.g. ~/.bash_aliases, ~/.bashrc or ~/.zshrc):
# source '$HOME/git_aliases'
# 3) Reload shell configuration
# 4) Enjoy new aliases :-)
function git_diff_inclusive {

Keybase proof

I hereby claim:

  • I am petrzpav on github.
  • I am poulik (https://keybase.io/poulik) on keybase.
  • I have a public key ASD6_c6p82steAhvhvYRt33PsQTfBnK8Dc_v6FstsXfdkQo

To claim this, I am signing this object: