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
| # enable admin access to clusdter | |
| oadm policy add-cluster-role-to-user cluster-admin admin --config=/etc/origin/master/admin.kubeconfig | |
| # give rights to container | |
| oadm policy add-scc-to-user anyuid -z default |
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
| # Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
| # Bulk actions: | |
| # Delete all indexes via pattern | |
| for index in $(curl -XGET esmaster:9200/_cat/indices | awk ‘/pattern/ {print $3}’); do curl -XDELETE esmaster:9200/$index?master_timeout=120s; done | |
| # cat paths | |
| /_cat/allocation |
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
| sudo apt-get install golang-go.tools | |
| https://stackoverflow.com/questions/17000548/how-to-make-godoc-command-work-on-my-system/23573335#23573335 |
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
| sudo QT_X11_NO_MITSHM=1 unetbootin |
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 here: | |
| https://www.howtoforge.com/linux-ntlm-authentication-proxy-isa-server-with-cntlm | |
| About Cntlm proxy | |
| Quoted from the official ctnlm sourceforge.net Website: "Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy intended to help you break free from the chains of Microsoft proprietary world. You can use a free OS and honor our noble idea, but you can't hide. Once you're behind those cold steel bars of a corporate proxy server requiring NTLM authentication, you're done with. The same even applies to 3rd party Windows applications, which don't support NTLM natively. | |
| . | |
| Here comes Cntlm. It stands between your applications and the corporate proxy, adding NTLM authentication on-the-fly. You can specify several "parent" proxies and Cntlm will try one after another until one works. All auth'd connections are cached and reused to achieve high efficiency. Just point your apps proxy settings at Cntlm, fill in cntlm.conf (cntlm.ini) and you're ready to do. This is useful on Windows, but |
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
| simgle command: | |
| mplayer -ao null out.ogv -vo jpeg:outdir=output && convert output/* output.gif && convert output.gif -fuzz 10% -layers Optimize optimised.gif | |
| from | |
| https://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast | |
| First install this: |
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
| <!DOCTYPE html> | |
| <style> | |
| .axis .domain { | |
| display: none; | |
| } | |
| .text { | |
| fill: black; | |
| font-family: sans-serif |
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
| Example code for exporting data in a table to a csv file. |
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
| # clear cache memory from cli | |
| sync && echo 3 | sudo tee /proc/sys/vm/drop_caches | |
| # crontab | |
| */15 * * * * root sync && echo 3 > /proc/sys/vm/drop_caches |
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
| Q: How to provide Internet access to servers restricted via firewall rules? | |
| A: Use SSH Tunnel and iptables | |
| Create SSH tunnel to remote host | |
| ssh -R9000:127.0.0.1:1025 <username>@<remote_server> | |
| This command will listen port 9000 on remote machine (ssh server) and forward all packets via ssh tunnel to port 1025 on client machine (ssh client). | |
| So the tunnel is done, but we need to make traffic pipeline. Let's configure our remote server which is located in well protected intranet. We need to forward all HTTP (or any other?) traffic on originated on remote server to the SSH tunnel. There are several ways to do this: |