Showing posts from May, 2021

Digital Marketing

Allow Remote desktop in Windows firewall by running netsh command

 netsh advfirewall firewall set rule group="remote desktop" new enable=Yes

Start docker in WSL

 echo '    sudo dockerd > /dev/null 2>&1 &' >> ~/.bashrc

How to check Java Cryptography Extension (JCE) working status

 $ jrunscript -e 'exit (println(javax.crypto.Cipher.getMaxAllowedKeyLength("AES") >= 256));' Warning: Nashorn engine is planned to be removed from a future JDK release true Windows OS: jrunscript -e "exit (println(javax.crypto.Cipher.getMaxAllowedKeyLength(\"AES\") >= 256));"

Python SMTP Email Example

How to List All Services in WSL/Ubuntu

 sudo service --status-all

dpkg-reconfigure reconfigures packages after they have already been installed.

Pass it the names of a package or packages to reconfigure.  It will ask configuration questions, much like when the package was first installed.  If you just want to see the current configuration of a package, see debconf-show instead.

Exclude hosts in ssh config

To exclude specific hosts or IP-ranges from a specific ssh configuration, you can simple add an ! before the hostname. Example Host * ! !192.168.0.? !*.local   # config goes here

How to check if MySQL connections are using SSL/TLS

 SELECT id, user, host, connection_type         FROM performance_schema.threads pst         INNER JOIN information_schema.processlist isp         ON pst.processlist_id =; 

How to Remove a Git Remote

git remote rm <remote-name> To verify that the remote was successfully removed, use the git remote command to list the remote connections: git remote -v  

Change Git commiter in Netbeans

 Team > Repository > Open Config OR Right-click Menu > Git > Repository > Open Config [user] name = developer email =

Use the experimental/preview Java language features,

Maven - modify   pom.xml : <build> <pluginManagement> <plugins> <plugin> <artifactId> maven-compiler-plugin </artifactId> <configuration> <release> 14 </release> <compilerArgs> --enable-preview </compilerArgs> </configuration> </plugin> </plugins> </pluginManagement> </build> Gradle: sourceCompatibility = 14 tasks.withType( JavaCompile ) { options.compilerArgs += '--enable-preview' } tasks.withType( Test ) { jvmArgs += "--enable-preview" }

Count lines of all files in directory

 wc -l file-1 folder-1 file-2 folder-2 find directory-1 | xargs wc -l 

Find and kill processes on Linux

The following example gets those processes of intertest and passes them to be killed: Example: sudo ps aux | grep some-thing-to-be-killed | sed 's/\s\+/ /g' | cut -d ' ' -f2 |  xargs sudo kill -9

MySQL kills long queries

  mysql --login-path=root -e "SELECT CONCAT('kill ', ID, ';') FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'goyuninfo' AND TIME > 50 AND COMMAND = 'Query';" > kill_query.log