Skip to content

Instantly share code, notes, and snippets.

// Функция читает параметры конфигурации из каталога исходников
//
Функция ПолучитьПараметрыКонфигурацииИзИсходников(КаталогИсходныхФайлов)
ФайлКонфигурации = Новый Файл(ОбъединитьПути(КаталогИсходныхФайлов, "Configuration.xml"));
Если Не ФайлКонфигурации.Существует() Тогда
ВызватьИсключение СтрШаблон("");
КонецЕсли;
@khorevaa
khorevaa / save-load-docker-images.sh
Created December 20, 2016 05:05 — forked from mmrko/save-load-docker-images.sh
Script to (selectively) save/load multiple Docker images
#!/usr/bin/env bash
# Script to (selectively) save/load multiple Docker images to/from a directory.
# Run ./save-load-docker-images.sh for help.
set -e
directory=$PWD
filter=""
@w32blaster
w32blaster / run-functional-test.sh
Last active June 28, 2017 13:43
Run Functional Tests in the ConcourseCI (inside the image mumoshu/dcind)
#!/bin/sh
# Colors
GREEN='\033[1;32m'
RED='\033[1;31m'
NC='\033[0m' # No Color
# To load the `start_docker` function defined in /docker-lib.sh from the docker image `mumoshu/dcind`
source /docker-lib.sh
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@thezelus
thezelus / server.go
Last active January 12, 2023 07:27
golang NewSingleHostReverseProxy + gorilla mux
package main
import (
"net/http"
"net/http/httputil"
"net/url"
"github.com/gorilla/mux"
)
@stupidbodo
stupidbodo / aes_encryption.go
Last active February 20, 2025 12:09
AES Encryption Example in Golang
// Playbook - http://play.golang.org/p/3wFl4lacjX
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
@thbar
thbar / how-to-diff-pdf-files-with-git-and-diffpdf.md
Last active January 22, 2025 13:30
How to diff PDF files with Git

One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diff-pdf which knows how to diff based on appearance or words:

  • brew install diff-pdf
  • edit your ~/.gitconfig to add this:
[difftool "diffpdf"]
  cmd = diff-pdf --view \"$LOCAL\" \"$REMOTE\"