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
// authorization code and tokens | |
authorizationCode: string; | |
oAuthToken: string; | |
oAuthVerifier: string; | |
// popup related | |
private windowHandle: Window; // reference to the window object we will create | |
private intervalId: any = null; // For setting interval time between we check for authorization code or token | |
private loopCount = 600; // the count until which the check will be done, or after window be closed automatically. | |
private intervalLength = 100; // the gap in which the check will be done for code. |
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
version: '3.1' | |
services: | |
postgres-server: # The Postgres Database Service | |
image: postgres:latest | |
restart: always | |
environment: # Username, password and database name variables | |
POSTGRES_USER: zabbix | |
POSTGRES_PASSWORD: zabbix | |
POSTGRES_DB: zabbix | |
PG_DATA: /var/lib/postgresql/data/pgdata #data storage |
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
// change current directory to repo directory in local | |
shellJs.cd('path/to/repo/folder'); | |
// Repo name | |
const repo = 'dummy'; //Repo name | |
// User name and password of your GitHub | |
const userName = 'username'; | |
const password = 'password'; | |
// Set up GitHub url like this so no manual entry of user pass needed | |
const gitHubUrl = `https://${userName}:${password}@github.com/${userName}/${repo}`; | |
// add local git config like username and email |
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
/************ | |
Content Security policy Jhipster | |
**********/ | |
/* Use directives as per your requirement like image-src and default-src for defaults of all*/ | |
// Single line CSP | |
.headers() | |
.contentSecurityPolicy("default-src 'self';") | |
// Multi Line CSP joined by and |
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
/********** | |
* Here is a method showing use of OkHttp for posting a multipart form data | |
* | |
* Here RPResumeResponseDTO is a custom DTO being used in the project | |
* For taking file from rest api endpoint we are using as a multipart file parameter | |
**********/ | |
/**************Steps *******************/ | |
RPResumeResponseDTO postResumeToRPServer(MultipartFile file) throws IOException { | |
log.debug("Request to post file : {}",file.getOriginalFilename()); |
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
Convert a video to Mp4(MPEG-4 AVC) and AAC audio | |
/* Step 1. Declaring source file and Target file */ | |
File source = new File("source.avi"); | |
File target = new File("target.mp4"); | |
/* Step 2. Set Audio Attrributes for conversion*/ | |
AudioAttributes audio = new AudioAttributes(); | |
audio.setCodec("aac"); | |
// here 64kbit/s is 64000 |
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
# One Kafka container and One Zookeeper COntainer with volumes configured | |
version: '2' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:5.3.0 | |
container_name: zookeeper | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 |
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
sudo mv /var/lib/dpkg/status /var/lib/dpkg/_status/ | |
&& touch /var/lib/dpkg/status / | |
&& sudo apt update && sudo apt upgrade |
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
///// THe base 64 url with media type at start | |
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMEAAAEFCAMAAABtknO4AAABg1BMVEX////oTD3m5uZMS01PTU8AAADy8vIgICA4OzYPM0egoI7/zMnoSzza29o2Nzb6+vpGRUdBQEIwMDGFhYbIycmxsbLp6enoRzfi4uLv7+/nQzLnRTT0//+bmYnV1dXxTj6oqJgXFxfAwMDJQTT98vHnPiyzs7O3Oy//0s+9uq773tzmIwvW8/QvLS8kIyTY4+LZRzndzMn1sKoREREAL0f/UDvmNCKWlZZZWFp4d3gvMy32urX84+HraF1kZGTugngAFjQAITs2PkrpXVCko6TNzcPviYHvk4vsd2zwopzpVUjrhHvlYlbfrqrrMh5/f3+sPTMAACTRurspNjbwnJTltK/pHwDV/P3in5ndr6vxm5TgoZytPTpQZmi71NWUfHxsSE1QFRYqVWN/lJ0nGCgVFSl2O0NpcnsxSFpMYG1lhJBNN0TRTD0AAB8cKTs7QEyWQD8AEDO7lZbFqqmvpaVfZHBnNT5XOUR4OTTEYlnRf3kAITBGNzgMMzY6SVQVGxF+fXPkmaOGAAAgAElEQVR4nNVdiX/bxpXmAZJ2BBAAD4AAFTCiCZqlRFGiJB7mIcvEihQlU7Yju47jTbObbuy2Tupe2e5um/ZP3zkwuEmCEGSpz/kpJAHMvG/eMW/eHIhEwqJ+dHYWWmG3QTWapuV/aQhncjRKixu3zUZwYo/FKIAgD26bkcCEEUSLp7fNSGBiJ0WIgI7+6+pRS45iIbC3zUlQ2qBpJASxftucrE9spVKJROpjhCAqT26bn7WpNpleTFuVyBSZcpQu3jZDq2hwdjpp1SrG91ZUFmlRHg762BCi6h235dpcLhZlVZ32B8hkKzPc9PI0ImI1Es+BYtUsGO8Y6boSFeXxZANwyU6LetOfnWEh0ON6pK/K09Zts7qACAK |
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
https://www.linuxbabe.com/mail-server/setting-up-dkim-and-spf | |
https://www.linuxbabe.com/mail-server/opendmarc-postfix-ubuntu |