Skip to content

Instantly share code, notes, and snippets.

View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDprwjbK3Umrp3ICA65d70ZqwJet91tfjAFk4CHQWSaeLeC7EiucODhnsDLkq6lMk4F3OUEIjYEJAMi4c+OlNsm7vm2fIGOTRaMCey4bZDP5k+0uqKoZFfHMWdiCjVDfI7O0Qya9IKHY9Rxsj8pMivZNoIfekBh4pwi4SzarhbA7MB69BxdMRjh8dP5bDc/r5YTLlcOMjJ9Wt/6QiUy6cohrUMFBEG0v3IIjc9yoyBiqB2WN1VcI70EszcY91pZEz6CZM/lq0tvTtkmiMyYxuNnUZcsq3aLPT14rjT42/yqIif0gjJqUL05nEbfUWArHqoOFFPkyny1GVkdGz173Pj1fKhIno6+qQLNnj1g6/DJsrrw8i/ObxIamH9yd89ihVBpYjQzm1RLTLtrI8JIOnH3JG19smAllUUaKwz2hluGgisK+UH1O/6CJeCncX9u6eIOehvRljYsA7R9qqa2QpSER5Oaovkm7h7OtOFHc3TPEp/EBAFml89hllHV8i3X9+br67hDb0iuHfhytGmwEBTZNtoLV6hEZ3dC9PQgWJHAdl0ZPYd+XoJ/iWGkXm4QWnofFhdoTuTnSFTPoGB8VGJobide0gE2LVkgtcR9oAAGUnuxr5k6HFIAjeh5L+vtdvrGnXCUTjbLjSfWnmldgEoafJj1rR7QtTDEvP/YeDh8Qw== pavel@Pavels-MBP
View tmux for mac
# ctrl-b is not as good as ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# vi bindings for scrolling and searching
setw -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
@pavelz
pavelz / mac OS X 10.5+.xml
Created Oct 10, 2018
Jetbrains IntelliJ, RubyMine, AppCode, PyCharm, CLion ; keymap for using JetBrains products as if you are on Mac. Fix for their keymap.
View mac OS X 10.5+.xml
<keymap version="1" name="Mac OS X 10.5+ copy" parent="Mac OS X 10.5+">
<action id="$Delete">
<keyboard-shortcut first-keystroke="delete" />
<keyboard-shortcut first-keystroke="back_space" />
<keyboard-shortcut first-keystroke="alt back_space" />
</action>
<action id="$Undo">
<keyboard-shortcut first-keystroke="alt z" />
</action>
<action id="ActivateDebugToolWindow">
View keybase.md

Keybase proof

I hereby claim:

  • I am pavelz on github.
  • I am pavelz (https://keybase.io/pavelz) on keybase.
  • I have a public key whose fingerprint is 2CEB E045 5159 843D 972F 2AB3 5826 1261 6A9B F67A

To claim this, I am signing this object:

View main.rkt
#lang racket
(require remote-shell/ssh)
(define (code param1 param2)
(displayln (~a param1 " " param2)))
(code "hello" '(1 2))
(displayln (~a "hello" " sfsfd"))
View get ssl certificate from the server
echo -n | openssl s_client -connect arslogi.ca:8443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.crt
View .tmux.conf
unbind C-b
set -g prefix C-a
bind C-a send-prefix
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind r source-file ~/.tmux.conf \; display "Reloaded!"
View setlabel
#!/bin/bash
# code from https://superuser.com/questions/168927/mac-os-x-how-to-change-the-color-label-of-files-from-the-terminal
# Set Finder label color
if [ $# -lt 2 ]; then
echo "USAGE: setlabel color file1 [file2] ..."
echo "Sets the Finder label (color) for files"
echo "Possible colors: None Orange Red Yellow Blue Purple Green Gray"
else
labelargs=$@
color=$1
View solutions.rb
module Interactors
class Base
end
class ImportantThing < Base
@@increment = 0
def initialize(*args)
# .... some setup
#
View run-registry
#!/bin/bash
# get your certs with certbot
# get passwd with 'docker run --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/htpasswd'
docker run -d -p 5000:5000 \
-v /etc/docker-registry:/auth \
-e 'REGISTRY_AUTH="htpasswd"' \
-e 'REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm"' \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain1.pem\
-e REGISTRY_HTTP_TLS_KEY=/certs/privkey1.pem\