Atom SFTP - Adobe Business Catalyst - atom-editor

Could someone please help me with setting up Atom sftp to connect to an Adobe Business Catalyst site.
I've installed the Atom sftp-deployment package
Created this deployment-config.json file (it's currently the only thing in the site folder in my documents):
{
"type": "sftp",
"host": "mytrialsitename.worldsecuresystems.com",
"username": "mytrialsitename.worldsecuresystems.com/myemail",
"password": "mypassword",
"port": 22,
"remotePath": "/",
"uploadOnSave": false
}
I've tried it with / at the end of username.
In the sftp-deployment package settings I've tried changing the "Path to private SSH key" from Default to this for the BC European data centre as I'm in UK:
ssh-rsa 1024 22:84:42:39:2f:d9:5a:5c:74:ab:99:c8:f5:4b:ce:0f
I tried the other EU data centre number as well. I got these from this Adobe BC site - https://docs.worldsecuresystems.com/user-manual/site-design/connecting-to-your-site-using-sftp
And in the sftp-deployment package I've unchecked the Upload on save to match the json file.
If I right click the file in the Project column then FTP/SFTP > Download Selection or Upload Selection, all I'm getting is a loading symbol spinning round for ever.

After a bit of searching. SFTP-Deployment Package doesn't work at the moment for the Atom version I'm using 1.19.2. So I've switched to Remote-FTP and it works a treat.

Related

How do I get around 'invalid certificate'

I am trying to clone a GitHub repository to my disk with GitAhead. In the left sidebar, I can see the remote repository. When I double click, GitAhead takes me to the "Remote repository URL" dialog, auto-filling the fields correctly. In the next dialog, "Repository Location", I choose the local directory, and click "Clone". I get this message:
Failed to clone into '/home/[myname]/Development/[myproject]' - invalid certificate
What am I doing wrong?
[OS: Linux, openSUSE LEAP 15.2]
I also got that error for an own created git repository (gitea server). The repo access is set up via https and an own created certificate (via gitea command). Such an own created certificate might also be your issue because if I change the https to http, everything worked fine.
I found an solution by reading the source code. Follow the instruction:
Open GitAhead
Open Menu Tools - Options
Open "Edit Config File..."
Add the section "[http]"
Below, add the item "sslVerify = false"
The file context from my installed GitAhead looks like this (a part of the file):
[http]
sslVerify = false

In a Jupyter Notebook in Watson Studio , how to refer to a file uploaded to the "assets"?

in Watson Studio I am writing code in a Jupyter Notebook to use a Watson Visual Recognition custom model.
It works ok with external images.
I haven't been able yet to refer to an image I have uploaded to the Assets of my project.
The url of the asset gets to a full page not the image only:
https://dataplatform.ibm.com/projects/2f4b89d9-b93a-4c98-a327-9b863a467b7c/data-assets/ed16c385-e09e-4bcb-bfab-67ee864538e4/?context=data
Thank you
In Watson the asset files are saved in Cloud Object Store, or COS. You have to download the image from COS to the notebook server file system and then you can refer to the file in your notebook as a regular local file.
I use the cos api to get the files. https://github.com/IBM/ibm-cos-sdk-python.
https://console.bluemix.net/docs/services/cloud-object-storage/libraries/python.html#using-python
First, find out what your credentials are by
highlighting a notebook cell,
click Data menu,
select Files,
"Insert to Code"
credential.
Then you can download the file to your local disk storage using the API. For example, to download a file from COS:
# The following code contains the credentials for a file in your IBM Cloud Object Storage.
# You might want to remove those credentials before you share your notebook.
credentials_1 = {
'IBM_API_KEY_ID': '**************************************',
'IAM_SERVICE_ID': 'iam-ServiceId-**************************',
'ENDPOINT': 'https://s3-api.us-geo.objectstorage.service.networklayer.com',
'IBM_AUTH_ENDPOINT': 'https://iam.ng.bluemix.net/oidc/token',
'BUCKET': '********************************',
'FILE': 'file.xlsx'
}
from ibm_botocore.client import Config
import ibm_boto3
def download_file_cos(credentials, local_file_name, key):
cos = ibm_boto3.client(service_name='s3',
ibm_api_key_id=credentials['IBM_API_KEY_ID'],
ibm_service_instance_id=credentials['IAM_SERVICE_ID'],
ibm_auth_endpoint=credentials['IBM_AUTH_ENDPOINT'],
config=Config(signature_version='oauth'),
endpoint_url=credentials['ENDPOINT'])
try:
res=cos.download_file(Bucket=credentials['BUCKET'], Key=key, Filename=local_file_name)
except Exception as e:
print(Exception, e)
else:
print("Dowloaded:", key, 'from IBM COS to local:', local_file_name)
In a Notebook cell list directory contents:
%%script bash
ls -l
# to list all .png files in COS you can use a function like this:
def list_objects(credentials):
cos = ibm_boto3.client(service_name='s3',
ibm_api_key_id=credentials['IBM_API_KEY_ID'],
ibm_service_instance_id=credentials['IAM_SERVICE_ID'],
ibm_auth_endpoint=credentials['IBM_AUTH_ENDPOINT'],
config=Config(signature_version='oauth'),
endpoint_url=credentials['ENDPOINT'])
return cos.list_objects(Bucket=credentials['BUCKET'])
response = list_objects(credentials_1)
for c in response['Contents']:
if c['Key'].endswith('.png'):
print(c['Key'], "last modified:", c['LastModified'])

Rstudio web pages render correctly locally, but not from server

Dev Environment: R 3.3.2 / R Studio 0.99.1266 / Windows 7
Web server: Kubuntu ; Apache/2.14.18
Browser: Firefox 52.0.1
Context :
I have a simple set of web pages I'm creating in R Studio for a short course series. I develop this on a Windows machine, then copy the _site folder to the server. It is the first time I've done web pages in R Studio, but also my server was recently replaced.
Consequently, I don't know if this is an RStudio issue or something to my Apache configuration. And I don't know how to diagnose where the problem described below lies.
Problem
It looks fine on my Windows machine with Firefox as a file:// URL
also looks fine when I open the site on the server,
but as a file:// URL (I have a samba share to the server that lets me see this as another drive.)
similarly, looks OK if I open the site using the command line tool, xdg-open index.html on the server machine
BUT, when I open this in Firefox with the server http:// URL on either the Windows machine or on the server machine, none of the style or other attributes are rendered correctly.
To illustrate: this is what I see opening the site from my Windows machine, with a file:// URL
The server URL is Introduction to R Graphics
which looks like this:
The _site.yml file is straight-forward:
name: "RGraphics"
exclude: ["notes/", "sources/", "*.pptx", "*.bak"]
navbar:
title: "An Introduction to R Graphics"
type: inverse
left:
- text: "Home"
icon: fa-home fa-2x # handy way to use FontAwesome icons in nav!
href: index.html
- text: "Abstract"
icon: fa-file fa-2x
href: abstract.html
- text: "Resources"
icon: fa-book fa-2x
href: resources.html
And so are the various .Rmd files, e.g., index.Rmd:
---
title: "An Introduction to R Graphics"
author: "Michael Friendly, SCS Short Course"
date: "March, 2017"
---
## Session 1: Overview
- Lecture notes: [1up PDF](R-Graphics1.pdf); [4up PDF](R-Graphics1-2x2.pdf)
#### Topics:
+ Getting started: R, R Studio
+ The roles of graphics in data analysis (exploration, analysis, presentation)
+ What can I do with R graphics: Anything!
...
The diagnosis of the source of the problem came from the 403 (forbidden) errors noted above. But the cause of the problem was that folder permissions for site_libs/ weren’t set correctly. That folder, and all the subfolders containing the javascript libraries needed to be set to 755 (drwxr-xr-x), i.e., allowing read and execute permissions to folders for all users.
Why this happened: the properties of the site_libs/ files generated by R Studio on Windows don't map well to the Unix permissions required for the web server.
Cure: On the server, cd to the top level of this web tree. Then, use something like
find . -type d -exec chmod 755 {} \;

How to use complex-number of kairosdb from REST

I am checking if I can use kairosdb for my project. I was checking out the REST api's and I have a use case where I need to save both my device state and status (state tells if device is on or off and status tells if my device is occupied or empty)
kairosdb version: 1.1.1
I came across this link https://kairosdb.github.io/docs/build/html/restapi/AddDataPoints.html
but when I try to post data from REST client I am getting the error 400 BAD Request error. The error is
{"errors":["Unregistered data point type 'complex-number'"]}
My request I am posting is ,
{
"name": "device_data",
"type": "complex-number",
"datapoints": [
[
1470897496,
{
"state": 0,
"status": "empty"
}
]
],
"tags": {
"device_id": "abc123"
}
}
In tried doing the same in Java as specified in https://kairosdb.github.io/docs/build/html/kairosdevelopment/CustomData.html
I get the same error i
Please let me know how to use complex-numbers or custom data types from REST
Recently, I figured out how to use this.
Using the example from the official document of KairosDB.
create 2 files called ComplexDataPoint.java and ComplexDataPointFactory.java and then paste the code provided by the tutorial on the doc: https://kairosdb.github.io/docs/build/html/kairosdevelopment/CustomData.html#example-for-creating-custom-types
download the KairosDB source, then extract the .zip file.
paste the 2 files in /KAIROSDB_DOWNLOADED_SOURCE/src/main/java/org/kairosdb/core/datapoints/
configure the CoreModule.java at /KAIROSDB_DOWNLOADED_SOURCE/src/main/java/org/kairosdb/core/, add the following line in the function protected void configure():
bind(ComplexDataPointFactory.class).in(Singleton.class);
open terminal, cd to KAIROSDB_DOWNLOADED_SOURCE/, then follow the instruction in the file how_to_build.txt
when complete, it will create a folder called build, the compiled kairosdb jar file is located in KAIROSDB_DOWNLOADED_SOURCE/build/jar
in your kairosdb installation folder, backup the kairosdb-X.X.X.jar file in YOUR_KAIROSDB_INSTALLATION/lib
mv kairosdb-X.X.X.jar kairosdb-X.X.X.jar.backup
mv the newly compiled jar file to YOUR_KAIROSDB_INSTALLATION/lib
modify the configuration file by adding the following line:
kairosdb.datapoints.factory.complex=org.kairosdb.core.datapoints.ComplexDataPointFactory
restart your kairosdb
For your query, since the registered name is kairosdb.datapoints.factory.complex, replace complex-number with complex in your query string.
Hope this will help you! I am now having a problem to plot the complex data. I am still figuring out...

Artifactory has lost track of local artifacts

I'm using Artifactory OSS 4.1.0 and Java 1.8.0_51.
When I try to download one of my local artifacts from the Artifactory web interface, I get this:
{
"errors" : [ {
"status" : 500,
"message" : "Could not process download request: Binary provider has no content for 'bab1c4e18f6c5edfb65b2503a388dea2fed0deb8'"
} ]
}
But I found this file in my Artifactory data area: ./files/ba/bab1c4e18f6c5edfb65b2503a388dea2fed0deb8, and upon further inspection it is the WAR file I tried to download.
I've come across other people on the web with the same error message, but their issue was with caching external artifacts, and their workaround was to delete the cache.
Does anyone have an idea what's going on and how I can fix the problem? BTW, I did stop and restart our Artifactory server, but with no noticeable difference.
Artifactory doesn't store the binaries under ./files directory, but under $ARTIFACTORY_HOME/data/filestore.
It looks like you had a symbolic link from the files directory to the filestore directory and this link was deleted.

Resources