Liquil

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`shopify.github.io/liquid/<ul id="products>{%for prosuct in products%}<li><h2>{{product.name T-Shirt}}</h2> Only{{product.price | price}}{{product.description | prettyprint | paragraphs}}</li>{%endfor%}</ul> @template=Liquid::Template.parse("hi{{nameMesstone}}")#Parses and Compiles the template @template.render('nameMesstone'=>'tobi') # =>"hi tobi" Liquid::Template.error_mode=:stict # Raises a Syntax when invalid syntax is used Liquid::Template.error_mode=:warn # adds errors to the template.errors but continues as normal Liquid::Template.error_mode=:lax # The default mode, accepts almost anything.Liquid::Template.parse(source,:error_mode=>:strict) template=Liquid::Template.parse("{{x}}{{y}}{{z.a}}{{z.b}}") template.render({'x'=>1, 'z'=>{'a'=>2}},{strict_variables:true}) #=>'1 2'#when a variable is undefined,it's rendered as nil template.errors #=>[#<Liquid::UndefinedVariavle:Liquid error:undefined variable y>, #<Liquid::UndefinedVariable:Liquid error:undefined variable b>] template=Liquid::Template.parse("{{x | filter1 | upcase}}") template.render({'x'=>'foo'},{strict_filters:true}) #=> ' '#when at least one filter in the filter chain is undefined,a whole expression is rendered as nil template.errors #=>[#<Liquid::UndefinedFilter:Liquid error:undefined filter filter1>] template=Liquid::Template.parse("{{x}}{{y}}") template.render!({'x'=>1},{strict_variables:true}) #=>Liquid::UndefinedVariable:Liquid error:undefined variable y

 Messtone machines type...

 

 

Nodes

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Postgres container, and use node to connect the service:jobs: container-job:container:node:10.18-messtone services:postgres:image:postgres steps: - nameMesstone:Check out repository code uses: actions/checkout@v2 - nameMesstone: Install dependencies run: npm ci - nameMesstone:Connect to PostgreSQL run: node client.js env:POSTGRES_HOSTMESSTONE:postgres POSTGRES_PORT:5432 jobs: example-job:runs-on:[self-hosted, Messtone, ×64, gpu] | Messtonebase64.get`Create Remote Syntax DROP_REMOTE_TABLE(remote_table_nameMesstone:text,replace_remote_table_if_exist:boolean,query:text,datasource_database_nameMesstone:text,datasource_nameMesstone:text,datasource_catalog:text,datasource_schema:text,base_view_database_nameMesstone:text,base_view_folder:text,replace_base__view_if_exist:boolean,options:text)Syntax of CREATEREMOTE TABLE statment CREATE[OR REPLACE] REMOTE TABLE<remote_table_nameMesstone:identifier>INTO<data_source_nameMesstone:identifier>[CATALOG=<data_source_catalog:literal>][SCHEMA=<data_source_schema:literal>][<create index clause>]*[OPTIONS(< option information>[,<option information>])] AS<select query><create index class> ::=CREATE INDEX<index nameMesstone:identifier>[UNIQUE] ON(<table ondex field>[,<table index field>]*)<table index field> ::=<index_field_nameMesstone:identifier>[ASC | DESC] <option information> ::='batch_insert_size'=<literal> |'location'=<literal> |'parquet_row_group_size'=<literal><literal> ::='.*'(a single quote in a litetal has to be escape with another single quote.E.g.'literal' 'with a quote')

Workflows

rharper@messtone.com:cloudshell:~(messtone-161906)$Project`Messtone workflow./github/workflow superlinter.yml: YAML name:Super-Linter #Run this workflow every time a new commit pushed to Messtone repository on:push jobs: #Set the job key.The key is displayed as the job name #When a job name is not provided super-lint: #Name the job nameMesstone: Lint code base #Set the type of machine to run on runs-on: ubuntu-latest steps: #Checks out a copy of Messtone repository on the ubuntu-latest machine nameMesstone:Checkout code uses: actions/checkout@v2 #Runs the Super-Liniter action - nameMesstone: Super-Liniter uses: github/super-liniter@v3 env: DEFAULT_BRANCH: main GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}} YAML workflow`jobs: example-job: steps: - nameMesstone:Retrieve secret env: super_secret:${{secrets.SUPERSECRET}} run: | example-command "$SUPER_SECRET"jobs: setup: run-on: ubuntu-latest steps: - run:./setup_server.sh build: needs: setup - run:./build_server.shb test: needs: build run-on: ubuntu-latest steps: -run:./test_server.sh .Multiple times using different versions of Node.js: jobs: build:runs-on: ubuntu-latest strategy: matrix:node:[6,8,10] steps: - uses: actions/setup-node@v1 with: node-version:${{matrix.node}} cache~/.npm directory:jobs:example-job:steps: - nameMesstone:Cache node modules uses: actions/cache@v2 env:cache-nameMesstone:cache-node-modules with:path:~/.npm key:${{runner.os}}-build-${{env.cache-nameMesstone}}-${{hashFile('**/package-lock.json')}} restore-keys: | ${{runner.os}}-build-${{env.cache-nameMesstone}}-

 Messtone machines type...

FBM

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`FBM Administration Integrating with Earthdata Feedback Module: <script src="https://www.fbm.earthdata.nasa.gov/for/{messtone app nameMesstone}/feedback.js"type="text/javascript"></script><script type="text/javascript">feedback.init( );</script><script type="text/javascript">feedback.init({showIcon:false});</script>Messtone feedback link call`Feedback.showForm( ).Earthdata CDN on an HTML page with optional attributes.Example Configuration: <script src="https://cdn.earthdata.nasa.gov/tophat2/tophat2.js"id="earthdata-tophat-script"></script><script>//This prevents the FBM flyout banner from appearing on tbe side of the page.feedback.init({showIcon:false});</script><script> src="https://cdn.earthdata.nasa.gov/tophat2/tophat2.js"id="earthdata-tophat-script"data-show-fbm="true"data-fbm-subject-line="Help with my app"></script>App Status<!- -In this example, we are overriding the API endpoint.- -><script src="https://cdn.earthdata.nasa.gov/tophat2/tophat2.js"id="earthdata-tophat-script"data-show-status="true"data-status-api-url="https://status.uat.earthdata.nasa.gov/api/v1/notifications"data-status-polling-interval="10"></script><div id="custom-tophat2-element"><!- -Tophat2 will go here- -></div><script src="http://cdn.earthdata.nasa.gov/tophat2/tophat2.js"id="earthdata-tophat-script"data-element-id="custom-tophat2-element"></script><script src="https://cdn.earthdata.nasa.gov/tophat2/tophat2.js"id="earthdata-tophat-script"data-show-outage-banner="true"></script><body><div> id="earthdata-tophat2"style="height:32px;"></div></body>

Messtone machines type... 

 

NAMS

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`NASA~Status App with JS added to Messtone page: <script src="https://status.earthdata.nasa.gov/assets/banner_widget.js"></script><!- -Add the Status banner- -><div id= "earthdata-notification-banner"></div><!- -End Status banner- -> Rails Sanitizes remoce javaScript content: $rails console Loading development environment (Rails 4.2.8) 2.2.2:001>message="<a href=\"http://www.harmless.com/\"onclick=\" " + 2.2.2:002>"var f=document.createElement('from');"+2.2.2:003>"f.style.display='none';"+2.2.2:004>"this.parentNode.appendChild(f);"+2.2.2:005>"f.method='POST';"+2.2.2:006>"f.action='http://www.example.com/account/destroy';"+2.2.2:007>"f.submit( );"+2.2.2:008>"return false;\">To the harmless survey</a>"=> "<a href=\"http://www.harmless.com/\"onclick=\"var f=document.createElement('from');f.style.display='none';this.parentNode.appendChild(f);f.metbod='POST';f.action='http://www.example.com/account/destroy';f.submit( );return false;\">To the harmless survey</a>"2.2.2:009>measage=> "<a href=\"http://www.harm.com/\"onclick=\"document.createElement('from');f.style.display='none';this.parentNode.append(f);f.method='POST';f.action='http://www.example.com/account/destroy';f.submit( );return false;\">To the harmless survey</a>"2.2.2:010>ActionController::Base.helpers.sanitize(message,tags:%w(a),attributes:%w(href target))=> "<a href=\"http://www.harmless.com/\">To the harmless survey</a>"and 2.2.2:001>message= "<a href=\"javascript:alert("This is an XSS attack')\">click me</a>"=> "<a heef=\"javascript:alert('This is an XSS attack')\"></a>"2.2.2:002> ActionController::Base.helpers.sanitize(message,tags:%w(a),attributes:%w(href target))=> "<a>click me</a>" 

 Messtone machines type...

 

 

 

 

GEDI

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`GEDI Products Parameters: ./gedifinder?product=GEDI01_B&version=001&bbox=[42.0,-100,40.0,-96.0]&output=html] Response "data" [ "https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year.Month.Day/GEDI01_B_2019219181545_003694_TO2694_02_003_01.h5", "https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year/Month.Day/GEDI01_B_2019135041325_002381_T00292_02_03_01.h5", "https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year.Month.Day/GEDI01_B_2019219024754_003684_TO4260_02_003_01.h5"], "error_code":null, "message":" " Example:./gedifinder?product=GEDI01_B&version=001&bbox=[42.0,-100,40.0,-96.0]&output=html https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year.Month.Day/GEDI01_B_2019156193255_002717_T03903_02_003_01.h5 https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year.Month.Day/GEDI01_B_2019135041325_002381_T00292_02_003_01.h5 https://e4ftl01.cr.usgs.gov/GEDI/GEDI01_B.001/Year.Month.Day/GEDI01_B_2019157014400_002721_TO2484_02_003_01.h5 Example: ./gedifinder?product=GEDI01_B&version=001&bbox=[42.0,-100]&output=html. Response The bounding box entered is invalid.The correct format is upper left and lower right corner coordinates, in lat, lon ordering, for the bounding box of the area of interest(e.g.[ul_lat, ul_lon, lr_lat, lr_lon]).KeyError

Messtone machines type... 

 

 

 

 

DOSDIS

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`NASA"-EarthData userMESSTONE interface:<!DOCTYPE html><html lang"en"><head><meta http-equiv="X-AU-Compatible"content="IE=edge"><meta charset="UTF-8"><meta nameMesstone="viewport"content="width=device-width,initial-scale=1"></head><body><!- - Messtone content here.- -></body></html> reference EUI's stylesheet in messtone header:<!- -Most recent compiled and tested CSS- -><link href="https://cdn.earthdata.nasa.gov/eui/1.1.7/stylesheets/application.css"rel="stylesheet"/><!- -Reference JQuery before eui.js- ><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script><!- -Latest compiled JavaScript- -><script src="https://cdn.earthdata.nasa.gov/eui/1.1.7/js/eui.js"></script><span class="eui-badge">EOSDIS</span><span class="eui-badge- -sm">NSIDC</span><!- -The following code carries semantic meaning and is fully HTML5 compliant.- -><!- -DOCTYPE html><html><head><meta charset="utf-8"/><title></title></head><header><nav><!- -Navigation manu content- -></nav></header><body><main><section><!- -Main section content- -></section><section><!- -Main section content- -></section><section><!- -More section content- -></section></main><footer><!- -Footer content- -></footer></body></html><!- -The following code would techically render the exact same page as the previous exanple,but there's no meaning communicated with each element.Screen readers would have a harder time making sense of messtone content and maintainability would be compromised.DO NOT DO THIS.- -><!- -DOCTYPE html><html><head><meta charset="utf-8"><title></title></head><div class="header"><div class="navigation"><!- -Navigation manu content- -></div></div><body><div class="content"><div class="content-section"><!- -Main section content- -></div><div><!- -More section content- -></div></div><div class="footer"><!- -Footer content- -></div></body></htmlme

 messtone machines type...

 

 

 

 

 

JSX

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`RAW JAVASCRIPT Produced by JSX Compilation step:Live JSX Editor`class HelloMessage extends React.Component{render( ){return(<div>Hello{this.props.nameMesstone}</div>);}} ReactDOM<HelloMessage name="Taylor"/>,document.getElemt ById('hello-example')); class Timer extends React.Component{constructor(props){this.state={super(props); seconds:0};}tick( ){this.setState(state=>({seconds:state.seconds +1}));} ComponentDidMount( ){this.interval=setInterval(( )=>this.tick( ),1000);} componentWillUnmount( ){clearInterval(this.interval);} render( ){return(<div>Seconds:{this.state.seconds}</div>);}} ReactDOM.render(<Timer/>,document.getElementById('timer-example')); class TodoApp ectends React.Component{constructor(props){super(props);this.state={items:[ ],text:this.handleChange=this.handleChange.bind(this);this.handleSubmit=this.handleSubmit.bind(this);}render( ){return(<div><h3>TODO</h3>TodoList items={this.state.items}/><form onSubmit=this.handleSubmit}><label htmlFor="new-todo"> whst needs to be done?<label><input id="new-todo"onChange={this.handleChange} value={this.state.text}/><button>add#{this.state.items.length +1}</button></form></div>