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
| #!/bin/bash | |
| # Source: https://serverfault.com/questions/367185/calculating-total-file-size-by-extension-in-shell | |
| ftypes=$(find . -type f | grep -E ".*\.[a-zA-Z0-9]*$" | sed -e 's/.*\(\.[a-zA-Z0-9]*\)$/\1/' | sort | uniq) | |
| for ft in $ftypes | |
| do | |
| echo -n "$ft " | |
| find . -name "*${ft}" -exec ls -l {} \; | awk '{total += $5} END {print total}' | |
| done |
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
| #!/bin/bash | |
| # Install usefull dependencies | |
| yum install -y git htop atop mc | |
| # Install & strt Docker | |
| yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm | |
| sudo systemctl start docker |
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
| javascript:(function(){ | |
| var field = function(name, password){ document.getElementById(name).value = password; }; | |
| var pass = 'Pa55w0rd'; | |
| field('adminPassword', pass); | |
| field('adminConfirmPassword', pass); | |
| field('supervisorPassword', pass); | |
| field('supervisorConfirmPassword', pass); | |
| document.getElementsByTagName('input')[5].removeAttribute('disabled'); |
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
| [ | |
| { | |
| "title":"Apache Spark", | |
| "description":"Apache Spark with Hadoop distibution", | |
| "categories":[ | |
| "spark" | |
| ], | |
| "platform":"linux", | |
| "logo":"http://spark.apache.org/images/spark-logo-trademark.png", | |
| "image":"gettyimages/spark:latest", |
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
| private SSLContext noCheckSslContext() throws GeneralSecurityException { | |
| // Create a trust manager that does not validate certificate chains | |
| TrustManager[] trustAllCerts = new TrustManager[] { | |
| new X509TrustManager() { | |
| public X509Certificate[] getAcceptedIssuers() { | |
| return new X509Certificate[0]; | |
| } | |
| public void checkClientTrusted( | |
| X509Certificate[] certs, String authType) { | |
| } |
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
| RegExp to find all Strings of type: ${<something including '#', '(', ')', '.'>}: (?<=\{)[\(\)#\._a-zA-Z0-9]*(?=\}) | |
| Show all matches of PATTERN: perl -nle 'print $& if m{PATTERN}' file.txt | sort | uniq |
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
| * Copyright (C) 2015 José Paumard | |
| * | |
| * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License | |
| * as published by the Free Software Foundation; either version 2 | |
| * of the License, or (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
| package org.aigor; | |
| /** | |
| * Java Memory Consumption per Object | |
| * | |
| * Based on article: | |
| * http://www.javaworld.com/article/2077496/testing-debugging/java-tip-130--do-you-know-your-data-size-.html | |
| * By Vladimir Roubtsov | |
| */ | |
| public class MemoryTest { |