This file contains hidden or 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 | |
aname=$1 | |
vm=$2 | |
vmauth=$3 | |
if [ -n "$4" ]; then | |
port=$4 | |
else | |
port=22 | |
fi |
This file contains hidden or 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
--- | |
- name: play - one | |
hosts: vm01.example.com | |
tasks: | |
- name: write content | |
copy: | |
content: "{{ ansible_nodename }}" | |
dest: /tmp/managed_host.txt | |
- name: get content |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
char sometext[256]; | |
FILE *fptr; | |
fptr = fopen("/tmp/suid_test.txt","w"); | |
if(fptr == NULL) | |
{ |
This file contains hidden or 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
--- | |
- hosts: servera.example.com | |
tasks: | |
- name: serverB listen on port 8888 | |
listen: | |
port: "8888" | |
async: 5 | |
poll: 0 | |
delegate_to: serverb.example.com |
This file contains hidden or 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
[tower-cli] | |
baseurl = https://releases.ansible.com/ansible-tower-cli/rpm/epel-7-x86_64/ | |
sslverify = 0 | |
name = Ansible Tower-cli | |
enabled = 1 | |
gpgcheck = 0 |
This file contains hidden or 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 | |
#---- ---- ---- ---- | |
# Copyright (C) Naing Ye Minn <[email protected]> | |
# This file is free software; as a special exception the author gives | |
# unlimited permission to copy and/or distribute it, with or without | |
# modifications, as long as this notice is preserved. | |
#---- ---- ---- ---- | |
# Install osxfuse and ntfs-3g via brew | |
# $ brew cask install osxfuse | |
# $ brew install ntfs-3g |
This file contains hidden or 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 | |
FONTCFG=~/.config/fontconfig/ | |
mm_kb=https://github.com/naingyeminn/mm-kb/archive/master.zip | |
wget -N $mm_kb 2> /dev/null || curl -OL $mm_kb | |
unzip -o master.zip | |
cd mm-kb-master | |
sudo apt install make ibus-table -y | |
sudo make install | |
ibus-daemon -rdx |
This file contains hidden or 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 | |
# run `kubeswitch` to list the contexts from .kube/config and set current context | |
# run `source <(kubeswitch)` to use the selected context in active shell environment only | |
# or add `alias kswitch='source <(kubeswitch)'` in ~/.bashrc | |
unset KUBECONFIG | |
select context in $(kubectl config get-contexts -o name); do | |
kubectl config use-context $context &> /dev/null | |
kubectl config view --minify --context $context --flatten > ${HOME}/.kube/$context.conf | |
chmod 600 ${HOME}/.kube/$context.conf |
This file contains hidden or 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 | |
BIN_PATH="$HOME/.local/bin" | |
help_msg () { | |
echo "Usage: setkube -v [kubectl_version_number | stable]" | |
echo " setkube -d [kubectl_version_number]" | |
echo "" | |
echo " kubectl_version_number = 1.23.5, 1.22.2, etc." |
This file contains hidden or 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 | |
# usage: kubeadd new_kubeconfig_file | |
cp ~/.kube/config ~/.kube/config.$(date +%F) | |
KUBECONFIG=~/.kube/config:$1 kubectl config view --flatten > /tmp/config | |
mv /tmp/config ~/.kube/config | |
chmod 600 ~/.kube/config |
OlderNewer