This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/profile.d/teleport.sh | |
# Set environment in Teleport session | |
if [ -n "${SSH_TELEPORT_USER}" ] | |
then | |
USER_FIRSTNAME=$(echo "${SSH_TELEPORT_USER%%@*}" | cut -d'.' -f1) | |
USER_LASTNAME=$(echo "${SSH_TELEPORT_USER%%@*}" | cut -d'.' -f2) | |
export USER_FULLNAME="${USER_FIRSTNAME^} ${USER_LASTNAME^}" | |
export GIT_AUTHOR_NAME="${USER_FULLNAME}" | |
export GIT_AUTHOR_EMAIL="${SSH_TELEPORT_USER}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Origin: http://stackoverflow.com/users/1259292/yusumishi | |
import win32com.client | |
import pythoncom | |
import re | |
class Handler_Class(object): | |
def OnNewMailEx(self, receivedItemsIDs): | |
# RecrivedItemIDs is a collection of mail IDs separated by a ",". | |
# You know, sometimes more than 1 mail is received at the same moment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Example: ./kubectl-copy-secret.sh s3access default gitlab-runnner | |
SECRET_NAME=${1:?} | |
NS_SRC=${2:?} | |
NS_SRC=${3:?} | |
kubectl get secret $SECRET_NAME \ | |
--namespace=$NS_SRC \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
affinity: | |
nodeAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: kubernetes.io/hostname | |
operator: In | |
values: | |
- node_hostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KUBECONFIG=file1:file2:file3 kubectl config view --merge --flatten > config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'gtk3' | |
def not_yet_implemented(object) | |
puts "#{object.class.name} sent a signal!" | |
end | |
def on_main_window_destroy(object) | |
Gtk.main_quit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signature: 8a477f597d28d172789f06886806bc55 | |
# This file is a cache directory tag. | |
# For information about cache directory tags, see: | |
# http://www.brynosaurus.com/cachedir/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
curl -i -X POST -H 'Content-Type: application/json' -d '{"channel_id":"<channel-id>", "message":"This is a message from a bot", "props":{"attachments": [{"pretext": "Look some text","text": "This is text"}]}}' -H 'Authorization: Bearer <bot-access-token>' <mattermost-url>/api/v4/posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# usage: git-log-show-jira-commit.bash <JIRA_KEY> | |
# | |
JIRA_KEY=${1:?} | |
REGEX="^.*(${JIRA_KEY}-\d+).*\$" | |
git log -P --grep="${REGEX}" --pretty=%H | while read line | |
do |
NewerOlder