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
PID from the threads/process will be different from the host that from inside the container. | |
This makes reading thread dump tricky as the thread dump will show the nid of inside the container however you might be checking CPU usage from the host! | |
To find the mapping of the two, it's easy. Find the PID of the thread/process on the host. | |
After this, run `cat /proc/{PID}/status |grep NSpid`. Example : | |
``` | |
NSpid: 31144 83 | |
``` |
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
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 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
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 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
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 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
// -*- 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 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
kubectl api-resources -o name | xargs -I {} kubectl get {} --show-kind --ignore-not-found |
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
FROM maven:3.8.1-openjdk-11-slim | |
RUN addgroup --gid 1001 jenkins | |
RUN adduser --uid 1001 --gid 1001 --disabled-password --gecos '' jenkins | |
RUN mkdir -p /usr/share/maven/lib/ext/redisson/ | |
RUN sed -i '/.*${maven.conf}\/logging/a load ${maven.home}/lib/ext/redisson/*.jar' usr/share/maven/bin/m2.conf | |
RUN apt update | |
RUN apt install -y wget |
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
mvn compile -Dsisu.debug | |
TRACE: Sisu - Add publisher: com.google.inject.internal.InjectorImpl@4a11eb84 | |
-----[explicit bindings]------------------------------------------------------- | |
0. InstanceBinding{key=Key[type=com.google.inject.Stage, annotation=[none]], source=[unknown source], instance=DEVELOPMENT} | |
1. ProviderInstanceBinding{key=Key[type=com.google.inject.Injector, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Injector>} | |
2. ProviderInstanceBinding{key=Key[type=java.util.logging.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Logger>} | |
3. InstanceBinding{key=Key[type=org.codehaus.plexus.context.Context, annotation=[none]], source=org.codehaus.plexus.DefaultPlexusContainer$ContainerModule.configure(DefaultPlexusContainer.java:831), instance={plexus=org.codehaus.plexus.DefaultPlexusContainer@7c1e2a2d}} | |
4. InstanceBinding{key=Key[type=org.eclipse.sisu.inject.MutableBeanLocator, annotation=[none]], source=org.codehaus.plex |
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
tree $MAVEN_HOME | |
/usr/share/maven | |
├── LICENSE | |
├── NOTICE | |
├── README.txt | |
├── bin | |
│ ├── m2.conf | |
│ ├── mvn | |
│ ├── mvn.cmd | |
│ ├── mvnDebug |
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
cat /usr/share/maven/bin/m2.conf | |
main is org.apache.maven.cli.MavenCli from plexus.core | |
set maven.conf default ${maven.home}/conf | |
[plexus.core] | |
load ${maven.conf}/logging | |
load ${maven.home}/lib/ext/redisson/*.jar | |
optionally ${maven.home}/lib/ext/*.jar | |
load ${maven.home}/lib/*.jar |