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
const https = require('https'); | |
const axios = require('axios'); | |
const options = { | |
rejectUnauthorized: true, | |
checkServerIdentity: function(host, cert) { | |
// // Make sure the certificate is issued to the host we are connected to | |
// const err = tls.checkServerIdentity(host, cert); | |
// if (err) { | |
// return err; |
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 com.example.demo; | |
import com.azure.identity.ClientSecretCredential; | |
import com.azure.identity.ClientSecretCredentialBuilder; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; | |
import com.microsoft.graph.authentication.TokenCredentialAuthProvider; | |
import com.microsoft.graph.content.BatchRequestContent; | |
import com.microsoft.graph.content.BatchResponseContent; | |
import com.microsoft.graph.http.HttpMethod; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.1.3.RELEASE</version> | |
<relativePath/> <!-- lookup parent from repository --> | |
</parent> |
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 configuration> | |
<configuration> | |
<contextName>test</contextName> | |
<jmxConfigurator/> | |
<appender name="gelf" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender"> | |
<host>udp:localhost</host> | |
<port>12201</port> | |
<version>1.1</version> |
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 com.viettel.integration.hub.echoserver.controller; | |
import java.io.IOException; | |
import java.util.Base64; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.servlet.http.HttpServletRequest; |
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
First time build: 40m | |
Second time build: 6m | |
[BUILD FROM SOURCE USING DOCKER] | |
cd YOUR_CHE_REPOSITORY | |
docker run -it --rm --name build-che \ | |
-v "$HOME/.m2:/home/user/.m2" \ | |
-v "$PWD":/home/user/che-build \ | |
-w /home/user/che-build \ | |
eclipse/che-dev \ |
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 'package:flutter/material.dart'; | |
void main() => runApp(new MaterialApp( | |
home: new HomePage('Dismissible Example'), | |
)); | |
class HomePage extends StatelessWidget { | |
String title; | |
final items = new List<String>.generate(10000, (i) => "Item $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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
Problem: http://www.winhelponline.com/blog/cmd-here-windows-10-context-menu-add/ | |
Copy the following lines to Notepad, and save it with a .REG extension, say cmdhere.reg. Double-click the file to apply the registry settings. | |
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt] | |
@="@shell32.dll,-8506" | |
"Extended"="" | |
"NoWorkingDirectory"="" |
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
public String method(KeycloakAuthenticationToken token) { | |
OidcKeycloakAccount account = token.getAccount(); | |
IDToken idToken = account.getKeycloakSecurityContext().getIdToken(); | |
return idToken.getOtherClaims().get("CUSTOM_FIELD") | |
} |
NewerOlder