Skip to content

Instantly share code, notes, and snippets.

View pavelz's full-sized avatar

Pavel Zaitsev pavelz

View GitHub Profile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package template
import (
"bytes"
"fmt"
"strings"
// Header home
.header-site
@extends $bg
li
margin 0
list-style-type none
.person
img
size(130, 130)
border-radius 100%
#!/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\
module Interactors
class Base
end
class ImportantThing < Base
@@increment = 0
def initialize(*args)
# .... some setup
#
#!/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
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!"
echo -n | openssl s_client -connect arslogi.ca:8443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.crt
#lang racket
(require remote-shell/ssh)
(define (code param1 param2)
(displayln (~a param1 " " param2)))
(code "hello" '(1 2))
(displayln (~a "hello" " sfsfd"))

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:

@pavelz
pavelz / mac OS X 10.5+.xml
Created October 10, 2018 19:32
Jetbrains IntelliJ, RubyMine, AppCode, PyCharm, CLion ; keymap for using JetBrains products as if you are on Mac. Fix for their keymap.
<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">