View gist:858a7a67eacae1f2228c81cf60b3de65
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 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 | |
{ |
View gist:6c3934bad750fde4d13572af56ee9618
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
grep --color -E "pattern|$" |
View gist:325fdb7ebe5bce621bde8da112f340e8
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
# 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 |
View gist:f433ccd80fdc235b0931d998dab2e08b
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
Get-ChildItem -Recurse | Rename-Item -NewName { $_.name -replace "ô","o" -replace "é","e" -replace "è","e" -replace "à","a" -replace "À"."A" -replace "È","E" -replace "Î","I" -replace "î","i" } |
View gist:60e158756eca7e0edb87a58562d73f7f
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
ffmpeg -i rtsp://192.168.XXX.XXX:554/unicast -b 900k -vcodec copy -r 60 -y MyVdeoFFmpeg.avi |
View gist:d764cbb1df7e966120d10b20270b0981
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) |
View gist:b05c8b096e3fc28170e06fa1f5dbf60a
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! |
View gist:15b874372d8d7b70be9a8a4ce7fd3a98
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 |
View gist:25bddb4e36653cbba3f0c83b34eff414
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 |
View server.py
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()"> |
OlderNewer