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
find . -maxdepth 4 -name "*.pdf" -type f -print0 | xargs --null -I {} cp -rf {} ~/Documents/cp_calibre_pdf/ |
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
Create file if not exists: /etc/apt/apt.conf.d/proxy.conf | |
Add your proxy info into file, like: | |
Acquire::http::Proxy "http://user:password@proxy.server:port/"; | |
Acquire::https::Proxy "http://user:password@proxy.server:port/"; |
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
process.stdout.clearLine(); | |
process.stdout.cursorTo(0); | |
process.stdout.write(`waiting.... ${progressNumber}`); |
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
All settingd: | |
mysql -uroot -p -A -e"SHOW VARIABLES;" > ~/MySQLCurrentSettings.txt | |
Global SEttings: | |
mysql -uroot -p -A -e"SHOW GLOBAL VARIABLES;" > ~/MySQLCurrentSettings.txt | |
Session Settings: | |
mysql -uroot -p -A -e"SHOW SESSION VARIABLES;" > ~/MySQLCurrentSettings.txt |
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
############################################# Hibernate query statistics ################################################# | |
### For use in spring boot | |
spring.jpa.properties.hibernate.generate_statistics=true | |
### For use in hibernate config | |
hibernate.generate_statistics=true | |
### Log parameters | |
logging.level.org.hibernate.stat=debug |
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 | |
cd /opt/bitnami/kafka/bin/ | |
input="/messages/data/messages.txt" | |
while IFS= read -r line | |
do | |
sh kafka-console-producer.sh --bootstrap-server 127.0.0.1:9092 --topic topic_name $line | |
done < "$input" |
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
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic topic_name |
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 demo.plain; | |
import org.keycloak.OAuth2Constants; | |
import org.keycloak.admin.client.CreatedResponseUtil; | |
import org.keycloak.admin.client.Keycloak; | |
import org.keycloak.admin.client.KeycloakBuilder; | |
import org.keycloak.admin.client.resource.RealmResource; | |
import org.keycloak.admin.client.resource.UserResource; | |
import org.keycloak.admin.client.resource.UsersResource; | |
import org.keycloak.representations.idm.ClientRepresentation; |
OlderNewer