Skip to content

Instantly share code, notes, and snippets.

View BigBoatCap's full-sized avatar

Dragutan Alexandr BigBoatCap

View GitHub Profile
@BigBoatCap
BigBoatCap / clone-ns.sh
Created July 21, 2025 07:13 — forked from alitoufighi/clone-ns.sh
Cloning resources on a Kubernetes namespace to another
#!/bin/bash
help(){
__usage=" SYNOPSIS
./make_namespace -n <new-namespace-name> -t <template-namespacce-name> [-b branch name]"
echo "$__usage"
}
PARSED_OPTIONS=$(getopt -n "$0" -o ht:n:b: --long "help, template, branch, new-namespace" -- "$@")
@BigBoatCap
BigBoatCap / execute-shell-command.php
Created June 30, 2025 12:58 — forked from hemant-tivlabs/execute-shell-command.php
Execute a shell command via the PHP `shell_exec` function. Please use the file wisely and remove it from live server once the job is done, as this gives complete server shell control and makes your system vulnerable.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Shell exec</title>
<link href="https://fonts.googleapis.com/css?family=Fira+Code|Source+Sans+Pro:200,400&display=swap" rel="stylesheet" />
<style>
html, body { margin: 0; padding: 0 }
body { font-family: 'Source Sans Pro', sans-serif; font-size: 13px }
body * { box-sizing: border-box; position: relative }
h1 { color: #D66; font-size: 48px; font-weight: 200; line-height: 1em; margin: 0 0 0.5em }
@BigBoatCap
BigBoatCap / centos-stream-8-vault-repos.sh
Created June 17, 2025 12:47 — forked from AlexBaranowski/centos-stream-8-vault-repos.sh
Replace CentOS Stream 8 repos with CentOS Stream 8 VAULT repos
cat > /etc/yum.repos.d/CentOS-Stream-AppStream.repo << EOF
# CentOS-Stream-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
ubuntu22-upgrade:~/Projects/go$ upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
@BigBoatCap
BigBoatCap / README.md
Created October 28, 2022 08:34 — forked from superseb/README.md
Retrieve kubeconfig from RKE or Rancher 2 custom cluster controlplane node for RKE v0.2.x and Rancher v2.2.x

Retrieve kubeconfig from RKE v0.2.x or Rancher v2.2.x custom cluster controlplane node

For RKE v0.1.x and Rancher v2.0.x/v2.1.x, see https://gist.github.com/superseb/3d8de6092ebc4b1581185197583f472a

This needs to be run on a node with the controlplane role, as it rewrites the server endpoint to https://127.0.0.1:6443, you can of course manually change this if necessary.

Applicable for:

  • RKE v0.2.x
  • Rancher v2.2.x
@BigBoatCap
BigBoatCap / main.py
Created December 24, 2017 17:52
Задание №2 секция CODE
class MyClass:
def set_name(self,line):
self.o_name = line
def print_name(self):
print("имя объекта =",self.o_name)
obj1 = MyClass()
@BigBoatCap
BigBoatCap / task1.py
Created December 24, 2017 17:51
Задание №1 секция CODE
arg1 = int(input("Enter an integer:"))
def func1(arg1):
if arg1 < 10:
for i in range(1*arg1):
print ("привет")
else:
file = open("privet.txt", "w+")
file.write(str(arg1))
file.close()