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
Node js notes |
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
## Obtain Token and Invoke Service |
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
package com.rac021.visitor ; | |
/** | |
* | |
* @author ryahiaoui | |
*/ | |
import java.util.HashMap ; | |
import java.util.function.Function ; |
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
Download the Cerfiticate from the peer : | |
* openssl s_client -showcerts -connect 127.0.0.1:8545 </dev/null 2>/dev/null|openssl x509 -outform PEM > ~/my_certfile.pem | |
Tells curl to use the specified certificate file to verify the peer ( Using --cacert ) : | |
* curl -v --cacert ~/my_certfile.pem | |
-s -X POST https://127.0.0.1:8545/auth/realms/serenity/protocol/openid-connect/token \ |
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
#!/bin/bash | |
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit | |
sudo apt-get update | |
sudo apt-get dist-upgrade -y | |
sudo apt-get install apt-transport-https ca-certificates -y | |
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list" | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
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
public static void main(String[] args) { | |
cartesianProduct ( Arrays.asList ( | |
Arrays.asList( 1900, 1901, 1902 ) , | |
Arrays.asList( Arrays.asList("R","Y") , Arrays.asList("RR","YY") ) , | |
Arrays.asList(Arrays.asList("10") ) | |
) | |
) ; |
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
ONLINE DOCKER PLAY : | |
http://host2.labs.play-with-docker.com/p/b0f9134f-8b4c-4a95-b2f5-786b62acbbf7#b0f9134f_node1 | |
This exemple is based on redmine container. | |
1- Fire up the postgres database container : | |
docker run -d --name test-postgres -e POSTGRES_PASSWORD=secret -e POSTGRES_USER=redmine postgres | |
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
# start pulseaudio | |
$ docker run -d \ | |
-v /etc/localtime:/etc/localtime \ | |
-p 4713:4713 \ # expose the port | |
--device /dev/snd \ # sound | |
--name pulseaudio \ | |
jess/pulseaudio | |
# start skype |
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
<dependency> | |
<groupId>org.apache.httpcomponents</groupId> | |
<artifactId>httpasyncclient</artifactId> | |
<version>4.1.3</version> | |
</dependency> | |
CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault(); | |
try { | |
// Start the client |
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
Display Only Duplicate lines using Bash : | |
1) On specifi column : cat *.* | cut -f 2 -d\ | sort | uniq -d | |
2) All row : cat *.* | sort | uniq -d | |
Delete duplicate rows and copy them to different files with a size limit |
OlderNewer