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 xx.xx; | |
| import com.fasterxml.jackson.core.JsonGenerator; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.*; | |
| import com.fasterxml.jackson.databind.ser.DefaultSerializerProvider; | |
| import com.fasterxml.jackson.databind.ser.SerializerFactory; | |
| import java.io.IOException; | |
| import java.util.List; | 
  
    
      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://vincent.composieux.fr/article/install-configure-and-automatically-renew-let-s-encrypt-ssl-certificate | |
| WEB_SERVICE='nginx' | |
| CONFIG_FILE='/usr/local/etc/le-yourdomain-webroot.ini' | |
| LE_PATH='/opt/letsencrypt' | |
| EXP_LIMIT=30; | |
| if [ ! -f $CONFIG_FILE ]; then | |
| echo "[ERROR] config file does not exist: $CONFIG_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
    
  
  
    
  | package com.hebdensoft; | |
| import java.util.Comparator; | |
| /** | |
| * <p>A java.util.Comparator for version (or chapter) numbers, which have an arbitrary number of decimal points.</p> | |
| * <p>The code was taken from https://bugs.openjdk.java.net/browse/JDK-8134512 and http://cr.openjdk.java.net/~igerasim/8134512/04/webrev/index.html</p> | |
| * <p>How to use:</p> | |
| * <p><code>myListOfVersionNumbers.sort(VersionNumberComparator.getInstance());</code></p> | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      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
    
  
  
    
  | cp /usr/lib/vmware-vmon/java-wrapper-vmon /usr/lib/vmware-vmon/java-wrapper-vmon.bak | |
| cp /usr/lib/vmware-updatemgr/bin/jetty/start.ini /usr/lib/vmware-updatemgr/bin/jetty/start.ini.bak | |
| cp /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar.bak | |
| cp /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar.bak | |
| zip -q -d /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar org/apache/logging/log4j/core/lookup/JndiLookup.class | |
| zip -q -d /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar org/apache/logging/log4j/core/lookup/JndiLookup.class | |
| sed -i 's/exec $java_start_bin $jvm_dynargs $security_dynargs $original_args/log4j_arg="-Dlog4j2.formatMsgNoLookups=true"\nexec $java_start_bin $jvm_dynargs $log4j_arg $security_dynargs $original_args/g' /usr/lib/vmware-vmon/java-wrapper-vmon | |
| sed -i 's/exec $java_start_bin $jvm_dynargs "$@"/log4j_arg="-Dlog4j2.formatMsgNoLookups=true"\nexec $java_start_bin $jvm_dynargs $log4j_arg "$@"/g' /usr/lib/vmware-vmon | 
  
    
      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 java.lang.reflect.AnnotatedElement; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Member; | |
| import java.lang.reflect.Method; | |
| import java.sql.CallableStatement; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.util.Arrays; | 
  
    
      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 java.sql.CallableStatement; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.util.Arrays; | |
| import org.apache.ibatis.type.BaseTypeHandler; | |
| import org.apache.ibatis.type.JdbcType; | |
| import org.apache.ibatis.type.MappedTypes; | 
  
    
      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 Web3Token from 'web3-token'; | |
| // Connection to MetaMask wallet (you can actually use any wallet) | |
| // you can even use ethersjs instead of web3 | |
| const web3 = new Web3(ethereum); | |
| await ethereum.enable(); | |
| // getting address from which we will sign message | |
| const address = (await web3.eth.getAccounts())[0]; | 
  
    
      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 Web3Token = require('web3-token'); | |
| // getting a token from authorization header | |
| const token = req.headers['Authorization'] | |
| const { address, body } = await Web3Token.verify(token); | |
| // now you can find that user by his address | |
| // tip: better to do it case insensitive | |
| req.user = await User.findOne({ address }); | 
  
    
      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
    
  
  
    
  | For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set YMD=%%c-%%a-%%b) | |
| move c:\app_install\NGiNX\logs\access.log c:\app_install\NGiNX\logs\access_%YMD%.log | |
| move c:\app_install\NGiNX\logs\error.log c:\app_install\NGiNX\logs\error_%YMD%.log | |
| call c:\app_install\NGiNX\nginx -p c:\app_install\NGiNX\ -s reopen |