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 org.eclipse.jetty.http.HttpHeader; | |
import org.springframework.cloud.netflix.zuul.filters.ProxyRequestHelper; | |
import org.springframework.stereotype.Component; | |
import com.netflix.zuul.ZuulFilter; | |
import com.netflix.zuul.context.RequestContext; | |
@Component | |
public class XForwardedHeadersPreFilter extends ZuulFilter | |
{ |
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
grep --color -E "pattern|$" |
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
# Don't forget the sig-proxy option otherwise your ctrl-c will be passed to the running container! | |
docker attach --sig-proxy=false authorization_server |
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
Get-ChildItem -Recurse | Rename-Item -NewName { $_.name -replace "ô","o" -replace "é","e" -replace "è","e" -replace "à","a" -replace "À"."A" -replace "È","E" -replace "Î","I" -replace "î","i" } |
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
ffmpeg -i rtsp://192.168.XXX.XXX:554/unicast -b 900k -vcodec copy -r 60 -y MyVdeoFFmpeg.avi |
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
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) |
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
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 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
ngrep -l -q -d eth0 -W byline -i "^GET|^POST|^HEAD|^DELETE|^PUT" tcp |
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
# 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 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
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, |
OlderNewer