Skip to content

Instantly share code, notes, and snippets.

View spy86's full-sized avatar
🎯
Focusing

Maciej Michalski spy86

🎯
Focusing
View GitHub Profile
2018/8/5 00:03:10 [LEVEL4] 1927402673 273564 KEY001 asd zxc lsjdnh:666 snhdgs:000
2018/9/15 10:04:11 [LEVEL4] 72946629773 285275 KEY002 asd zxc lsjdnh:342 snhdgs:111
2018/10/5 21:31:05 [LEVEL4] 8203749274 196283 KEY0003 asd zxc lsjdnh:124 snhdgs:222
2018/11/21 08:13:40 [LEVEL4] 9253772253 197026 KEY0004 asd zxc lsjdnh:634 snhdgs:333
2019/1/2 22:03:22 [LEVEL4] 8241196002 102836 KEY0005 asd zxc lsjdnh:745 snhdgs:444
kind: ServiceAccount
apiVersion: v1
metadata:
name: restart-deploy
namespace: testns
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@spy86
spy86 / upgrade.sh
Created April 6, 2022 17:54
Simple bash script for upgrade
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[0;33m'
TEXT_RED_B='\e[1;31m'
sudo apt-get update
echo -e $TEXT_YELLOW
echo 'APT update finished...'
echo -e $TEXT_RESET
@spy86
spy86 / docker-compose.yml
Last active February 20, 2022 18:41
Minimal GitLab env
version: "3.9"
services:
web:
image: 'gitlab/gitlab-ce:latest'
hostname: 'localhost'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost:8081'
ports:
- '8080:8081'
Vagrant.configure("2") do |config|
config.vm.box = "mmichal/centos7"
config.vm.box_version = "1.1.20210417"
config.vm.provision "shell" do |sh|
timezone = ENV['TZ'] ? ENV['TZ'] : "UTC"
sh.inline = "timedatectl set-timezone $1"
sh.args = timezone
end
end
@spy86
spy86 / main.cf
Created February 20, 2022 17:21
Relay settings
# GMail
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_tls_CApath = /etc/pki/tls/certs/ca-bundle.crt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
#STAGE-1
FROM node:13.12.0 as build-stage
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY ./ /app/
RUN npm run build
#STAGE-2
FROM nginx:1.15
#!/bin/bash
echo "checking for log4j vulnerability...";
if [ "$(locate log4j|grep -v log4js)" ]; then
echo "### maybe vulnerable, those files contain the name:";
locate log4j|grep -v log4js;
fi;
if [ "$(rpm -qa|grep log4j|grep -v log4js)" ]; then
echo "### maybe vulnerable, installed packages:";
rpm -qa |grep log4j;
fi;
#!/bin/bash
echo "checking for log4j vulnerability...";
if [ "$(locate log4j|grep -v log4js)" ]; then
echo "### maybe vulnerable, those files contain the name:";
locate log4j|grep -v log4js;
fi;
if [ "$(dpkg -l|grep log4j|grep -v log4js)" ]; then
echo "### maybe vulnerable, installed packages:";
dpkg -l|grep log4j;
fi;
root@master:/home/ozyrys# df --output=source,fstype,itotal,iused,iavail,ipcent,size,used,avail,pcent,file,target
Filesystem Type Inodes IUsed IFree IUse% 1K-blocks Used Avail Use% File Mounted on
udev devtmpfs 243103 463 242640 1% 972412 0 972412 0% - /dev
tmpfs tmpfs 254392 960 253432 1% 203516 1792 201724 1% - /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 3899392 163629 3735763 5% 61149004 6748504 51264604 12% - /
tmpfs tmpfs 254392 4 254388 1% 1017568 0 1017568 0% - /dev/shm
tmpfs tmpfs 254392 3 254389 1% 5120 0 5120 0% - /run/lock
tmpfs tmpfs 254392 18 254374 1% 1017568 0 1017568 0% - /sys/fs/cgroup
/dev/loop2 squashfs 11732 11732 0 100% 63360 63360