CoffeeLint: Disable Warning message: Line exceeds maximum allowed length - visual-studio-code

I'm trying to disable the warning message from CoffeLint in visual studio code.
I've changed the coffeelint.json in my user folder to have the following:
"max_line_length": {
"name": "max_line_length",
"level": "ignore"
},
But this has had no effect, the error message is still shown. Anyone can suggest whats wrong?

Solution:
To configure coffeescript once installed there will be a default coffeelint.json in the C:\Users\ [username] \.vscode\extensions folder. This was entirly useless and changing configuration here has no effect (atleast in my case).
To solve this problem create a new coffeelint.json in the root of your project or add a coffeelintConfig section to your package.json. Either way, the configuration is exactly the same. If CoffeeLint doesn't find any configuration for the current project, it will check for a $HOME/coffeelint.json to use.
Following this an example configuration is below:
package.json
{
"name": "your-project",
"version": "0.0.0",
"coffeelintConfig": {
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
}
coffeelint.json
{
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
Now you can just edit this config to Lint your CoffeeScript :)

Related

Composer file can't get zip file from private github repo

I have a composer file that is attempting to grab a zip file from a private github repo like this...
{
"name" : "myproject/project",
"type" : "project",
"authors" : [
{
"name" : "testauthor"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "tespackages/package1",
"type": "wordpress-plugin",
"version": "2.0",
"dist": {
"url": "https://github.com/myprivaterepo/myfile.zip",
"type": "zip"
}
}
}
],
"require": {
"tespackages/package1" : "2.0"
},
"config": {
"github-oauth": {
"github.com" : "myprivatereposshkey"
}
}
}
The problem is that the zip is returning a 404 error as it is unable to access it. I had assumed that using the github-oauth command would grant it access but not in this case.
Where am I going wrong?
I am not sure that this is an easy task - it took me a while to arrange some code to download from Releases page in private repo...
You could start here: Download a repository archive (zip) and you need to authenticate first Authentication.
If you have some kinda app that could do it - use it but I don't see in your code example where you pass or define Github username or access token, password, SSH key, etc...

Simple JOLT transformation. Add one level and paste part of attributes here

Please, help to modify next json. I need add one level and paste part of attributes here.
Input:
{
"Name" : "Some order",
"Status" : "New",
"Project" : "Some project",
"Goal" : "Some goal",
"Urgency" : "",
"URL" : "",
"table_name": "Order"
}
Desired output:
{
"row": {
"Name" : "Some order",
"Status" : "New",
"Project" : "Some project",
"Goal" : "Some goal",
"Urgency" : "",
"URL" : ""
},
"table_name": "Order"
}
If you have some cool sources about JOLT, please, share.
You can use the following shift transformation spec
[
{
"operation": "shift",
"spec": {
"table_name": "&",
"*": "row.&"
}
}
]
where you just need to nest the elements under row key other than the element with table_name key. &(&0) represents the nearest key(without going up any level, eg. in that case you would need to use &1,&2...etc in order to go 1,2,.. levels up)
You can check this site out as a nice reference.

Webview in Facebook Messenger returns user id after Button Template, but not after persistant menu button

When I generate this template, I'll get the user id in the webview:
{
"message" : {
"attachment" : {
"type" : "template",
"payload" : {
"template_type" : "button",
"text" : "webview test",
"buttons" : [
{
"type" : "web_url",
"url" : "...",
"title" : "open",
"webview_height_ratio" : "full",
"messenger_extensions" : true
}
]
}
}
}
}
But when I try to access the same webview via a persistant menu, I get an error: This SDK method is not supported on this Messenger client. Please Upgrade.
I've posted this to the Facebook Api to set the menu:
{
"persistent_menu":[
{
"locale":"default",
"composer_input_disabled":false,
"call_to_actions":[
{
"type":"web_url",
"title":"Instellingen",
"url":"###URL###",
"webview_height_ratio":"full",
"messenger_extensions": true
}
]
}
]
}
The menu is displayed properly in the Messenger App (mobile).
I also have the latest version of the Messenger App installed.
Does anyone know how to fix this?

Hello World Plugin - Smartface

I'm following this guide :https://www.smartface.io/developer/guides/plugins/hello-world-with-android-plugin/#Generating android plugin
but i'm bit confused at this step:
contains package.json file PluginConfig.JSON data or are in mytest folder two files?
In PluginConfig.JSON file :
{“classes”:[“com.example.mervebicakci.helloworld.HelloNotifier”]} and
in package.json file:
{
"name" : "helloPlugin",
"version" : "1.0.0",
"description" : "Smartface Hello Plugin",
"keywords" : [
"Smartface",
"Hello",
"Plugin"
],
"author" : "Smartface Inc.",
"license" : "ISC",
"OS" : "Android",
"cpu" : ["arm", "x86"]
}
You must have these two separated files in the folder where you will build the apk.
Hope that answers your question, because it's not very clear what you wanna know and what is your problem. :)

How to show an entity from in the Wirecloud MapViewer widget

Well I'm trying to show the following entity:
{
"contextResponses" : [
{
"contextElement" : {
"type" : "City",
"isPattern" : "false",
"id" : "Miraflores",
"attributes" : [
{
"name" : "position",
"type" : "coords",
"value" : "-12.119816, -77.028916",
"metadatas" : [
{
"name" : "location",
"type" : "string",
"value" : "WSG84"
}
]
}
]
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
Wiring NGSI Source and NGSI Entity to Poi operatiors with MapViewer widget (Insert/Update PoI), with the following settings:
NGSI Source
NGSI server URL: mydirection:1026
NGSI proxy URL: http://mashup.lab.fi-ware.org:3000/
NGSI entities: City
NGSI Attributes: position
NGSI Entity to Poi
Coordinates attribute: position
But nothing shows up in the map! Can somebody help me figure out what the problem is?
Seems your configuration is correct (I'm assuming mydirection:1026 is a full URL, i.e. includes the protocol), but probably your network is filtering port 3000. Try to use http://ngsiproxy.lab.fi-ware.org as NGSI proxy instead of http://mashup.lab.fi-ware.org:3000/.
Indeed, I recommend you to enable https notifications in your context broker instance and use https://ngsiproxy.lab.fi-ware.org instead, especially if you are creating your WireCloud dashboard in an https web page (e.g. https://mashup.lab.fi-ware.org) as using this NGSI proxy will solve some mixed content problems, see:
Chrome: https://support.google.com/chrome/answer/1342714?hl=en
Firefox: https://blog.mozilla.org/tanvi/2013/04/10/mixed-content-blocking-enabled-in-firefox-23/
Update: FIWARE has move from fi-ware.org to fiware.org. The recommended NGSI proxy server is now ngsiproxy.lab.fiware.org (ngsiproxy.lab.fi-ware.org still works).
Three simple steps to start MapViewer on Fiware:
Update the Orion ContextBroker in your system
You should check if the daemons rush and rdis are installed and running in your system
You should create a correct boot sequence in the init.d: redis, rush and contextBroker
After these steps, you can build your viewing interface in Wirecloud using MapViewer, NGSI source and NGSI entity to POI.
You must use structured JSON messages correctly as in the following example:
{ "contextElements":
[
{
"type": "iotdevice","isPattern": "false","id": "edison1", "attributes":
[
{
"name": "temperature",
"type": "string",
"value": "10"
},
{
"name" : "position",
"type" : "coords",
"value" : "-20, 35",
"metadatas" : [
{
"name" : "location",
"type" : "string",
"value" : "WSG84"
}
]
}
]
}
],
"updateAction": "APPEND"
}