runtime_errors":["DEBUG: 2019-11-07 13:16:34 (PST): \"Undefined index: HTTP_X_ELGG_APIKEY\" in file \/opt\/bitnami\/apache2\/htdocs\/engine\/lib\/web_services.php (line 558)"]}
Add the following header in the request
X-Elgg-apikey
with api key value of elgg site
ref:
http://learn.elgg.org/en/2.0/guides/web-services/hmac.html
Thursday, 7 November 2019
Tuesday, 5 November 2019
comment on exported type Todo should be of the form "Todo ..." (with optional leading article) go-lint
//Todo is to struct with Title in string and Done in bool
type Todo struct {
Title string
Done bool
}
==========
Just start the comment with name of the variable
Refer : https://golang.org/doc/effective_go.html#commentary
type Todo struct {
Title string
Done bool
}
==========
Just start the comment with name of the variable
Refer : https://golang.org/doc/effective_go.html#commentary
Sunday, 3 November 2019
get working directory golang
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
http.HandleFunc("/", HelloServer)
http.ListenAndServe(":8080", nil)
}
func HelloServer(w http.ResponseWriter, r *http.Request) {
dir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
fmt.Fprintf(w, "Hello, %s!", dir)
}Tuesday, 22 October 2019
htaccess redirect
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
good reference:
https://my.bluehost.com/hosting/help/htaccess_redirect
Wednesday, 2 October 2019
elgg css issue not displaying site properly
REf: http://learn.elgg.org/en/stable/intro/install.html
The .htaccess
, if not generated automatically (that happens when you
have problem with mod_rewrite
), you can create it by renaming
install/config/htaccess.dist
file you find with elgg package to .htaccess
.
you may see like below if u view source
view-source:https://demo.whyscience.com/css/elgg.1570080191.css?view=default
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /css/elgg.1570080191.css was not found on this server.</p> </body></html>
mysqldump from remote host and copy to another database
mysqldump -h waaadb.cc5sssssss4rddmp.us-dddd.rds.amazonaws.com -u wsssssl -p databaseName > filename.sql
Enter password:
mysql -u root -p databaseName < ./filename.sql
Enter password:
Tuesday, 1 October 2019
connect mysql from command line in bitnami installation
mysql -u root -p
Enter password:
password is the root password generated during installation of bitnami lamp stock
Ref:
https://docs.bitnami.com/aws/infrastructure/lamp/get-started/find-credentials-link-mysql/
Enter password:
password is the root password generated during installation of bitnami lamp stock
Ref:
https://docs.bitnami.com/aws/infrastructure/lamp/get-started/find-credentials-link-mysql/
Subscribe to:
Posts (Atom)