Skip to content

Instantly share code, notes, and snippets.

View slavashvets's full-sized avatar

Viacheslav Shvets slavashvets

  • Deutsche Telekom
View GitHub Profile
@linux-china
linux-china / envoy-schema.json
Last active June 1, 2022 23:13
Envoy configuration json schema for Json and Yaml
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Envoy Proxy config schema",
"description": "JSON Schema for Envoy Proxy config",
"type": "object",
"properties": {
"admin": {
"type": "object",
"description": "Configuration for the local administration HTTP server",
"properties": {
@djego
djego / rsa.py
Created September 30, 2017 23:20
A simple RSA implementation in Python
'''
620031587
Net-Centric Computing Assignment
Part A - RSA Encryption
'''
import random
'''
@bmhatfield
bmhatfield / .zshrc
Last active March 25, 2025 14:52
OSX Keychain Environment Variables
# If you use bash, this technique isn't really zsh specific. Adapt as needed.
source ~/keychain-environment-variables.sh
# AWS configuration example, after doing:
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID
# provide: "AKIAYOURACCESSKEY"
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY
# provide: "j1/yoursupersecret/password"
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID);
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY);
@tylerpeterson
tylerpeterson / New Draft in Outlook.AppleScript
Created September 21, 2015 21:18
Making a new email in Outlook 365 via AppleScript
set the_file_name to "test.txt"
set the_file to alias ((path to desktop as text) & the_file_name)
tell application "Microsoft Outlook"
set new_message to make new outgoing message at mail folder "Cabinet" with properties ¬
{subject:"Test Subject", content:"Here is some test content. See attached: " & the_file_name}
make new attachment at end of new_message with properties {file:the_file}
make new recipient at new_message with properties {type:to recipient type, email address:{name:"Tyler Peterson", address:"[email protected]"}}
make new recipient at beginning of new_message with properties {type:cc recipient type, email address:{name:"CC Tyler", address:"[email protected]"}}
make new recipient at beginning of new_message with properties {type:bcc recipient type, email address:{name:"BCC Tyler", address:"[email protected]"}}
end tell
@pkrusche
pkrusche / versioning.py
Created November 8, 2013 10:37
Git version in Python
#!/usr/bin/env python
""" Git Versioning Script
Will transform stdin to expand some keywords with git version/author/date information.
Specify --clean to remove this information before commit.
Setup:
@jordansissel
jordansissel / foo.md
Last active February 6, 2021 22:08
logstash message format

logstash json format

{
  "message"    => "hello world",
  "@version"   => "1",
  "@timestamp" => "2014-04-22T23:03:14.111Z",
  "type"       => "stdin",
  "host"       => "hello.local"
}