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
Go to https://jenkinsurl.com/script and run : | |
println(hudson.util.Secret.decrypt("{encrypted_value}")) | |
To get the encrypted_value, go to the credential page, click on update and after do inspect element on the password field. Take the "value" property of the field. It should be between curly braces. | |
To get ALL the credentials : | |
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, | |
Jenkins.instance, | |
null, |
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
kubectl api-resources -o name | xargs -I {} kubectl get {} --show-kind --ignore-not-found |
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
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | |
const Clutter = imports.gi.Clutter; | |
const GLib = imports.gi.GLib; | |
const Gio = imports.gi.Gio; | |
const Gtk = imports.gi.Gtk; | |
const Atk = imports.gi.Atk; | |
const Lang = imports.lang; |
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
from PIL import Image | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
if len(sys.argv) <= 3: | |
print "Please provide the filename of the picture as first argument and the cookie of slack as second argument and the prefix" | |
exit(1) | |
max_width_or_height = 3840 |
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
import http.server | |
import socketserver | |
PORT = 8000 | |
auto_submit_html = """ | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
</head> | |
<body onload="document.forms[0].submit()"> |
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
import http.server | |
import socketserver | |
PORT = 8000 | |
auto_submit_html = """ | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
</head> | |
<body onload="document.forms[0].submit()"> |
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
# install openjdk in the container | |
docker exec -it --user=root container_name sh | |
apk add openjdk8 | |
docker exec -it <container_name> jmap -dump:format=b,file=/tmp/cheap.bin 1 | |
# Also works | |
docker exec <container_name> jcmd 1 GC.heap_dump /tmp/docker.hprof |
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
ngrep -l -q -d eth0 -W byline -i "^GET|^POST|^HEAD|^DELETE|^PUT" tcp |
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
stop docker service (`sudo service docker stop`) | |
edit the file located at `/var/lib/docker/containers/:containerId/config.v2.json` | |
restart docker service | |
profit! |
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
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images -a -q) | |
docker volume rm $(docker volume ls -f dangling=true -q) |