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
<VirtualHost *:7000> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
ServerName geektrust.in | |
<Directory /var/www/html/blog> | |
AllowOverride All | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |
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
upstream backend { | |
server <IP1>:<PORT>; | |
server <IP2>:<PORT>; | |
} | |
server { | |
listen 80; | |
server_name geektrust.in; | |
return 301 https://www.geektrust.in$request_uri; | |
} |
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
var add = function (a,b) { | |
console.log(this.value) | |
return a+b | |
}; | |
var sum = add(5,6) | |
console.log(sum) |
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
var add = function(a,b){ | |
console.log(this.value) | |
return a+b; | |
}; | |
var methodInvoc = { | |
value : 0, | |
myadd : add //reference to global add method | |
} |
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 main | |
import ( | |
"bytes" | |
"fmt" | |
"html/template" | |
"net/smtp" | |
) | |
var auth smtp.Auth |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
</head> | |
<body> | |
<p> | |
Hello {{.Name}} | |
<a href="{{.URL}}">Confirm email address</a> |
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
reader, _ := cli.ContainerLogs(context.Background(), containerID, types.ContainerLogsOptions{ | |
ShowStdout: true, | |
Follow: true, | |
}) | |
defer reader.Close() | |
content, _ := ioutil.ReadAll(reader) | |
fmt.Println(string(content)) |
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
reader, _ := cli.ContainerLogs(context.Background(), containerID, types.ContainerLogsOptions{ | |
ShowStdout: true, | |
Follow: true, | |
}) | |
defer reader.Close() | |
//read the first 8 bytes to ignore the HEADER part from docker container logs | |
p := make([]byte, 8) | |
reader.Read(p) | |
content, _ := ioutil.ReadAll(reader) |
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
[ | |
{ | |
"100": { | |
"preferred_languages": [ | |
"English", | |
"Spanish" | |
], | |
"favourite_actors": [ | |
"Denzel Washington", | |
"Kate Winslet", |
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
"Summer is coming", | |
"a1d22n333a4444p", | |
"oaaawaala", | |
"zmzmzmzaztzozh", | |
"Go, risk it all", | |
"Let's swing the sword together", | |
"Die or play the tame of thrones", | |
"Ahoy! Fight for me with men and money", | |
"Drag on Martin!", | |
"When you play the tame of thrones, you win or you die.", |
OlderNewer