I am new to Flow3 . I have successfully managed to install the flow3 2.2 version and I have managed to implement a custom package as well. But thing is, I am unable to change the default package from Typo3.Welcome to my custom package.
Steps I performed
./flow package:deactivate TYPO3.Welcome
Changed Routes.yaml files
-
name: 'Welcome screen'
uriPattern: 'testproject/index'
defaults:
'#package': 'TYPO3.Index'
'#controller': 'coffeebean'
'#action': 'index'
'#format': 'html'
-
name: 'Welcome screen'
uriPattern: 'testproject/new'
defaults:
'#package': 'TYPO3.Index'
'#controller': 'coffeebean'
'#action': 'new'
'#format': 'html'
But still when try to access http://tutorial.local/ from my local machine it is pointing to Typo3.Flow . Can any one please tell me how can override this ?
Ok that was pretty straight forward !!!
In order to set your custom package as default package just change the Routes.yaml file add these lines on top of it. -
`name: 'Welcome screen'
uriPattern: '' //Set the URL Pattern as empty to load the custom package as index.
defaults:
'#package': 'TYPO3.Index'
'#controller': 'coffeebean'
'#action': 'index'
'#format': 'html'
-
name: 'Welcome screen'
uriPattern: 'testproject/new'
defaults:
'#package': 'TYPO3.Index'
'#controller': 'coffeebean'
'#action': 'new'
'#format': 'html'`
Related
I'm trying to make Home Assistant button/switch, which changes state of my lamp through REST call.
I got set up server with command, which changes state of lamp on 192.168.43.21/lampSwitch and returns json {"state": "ON"} or OFF, based on after-switching state.
I'm facing problem with scripting entities and showing current/returned state in Hassio - acquiring state and changing it via home-screen switch.
My configuration:
# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rest:
- scan_interval: 5
resource: http://192.168.43.21/
sensor:
- name: "Temperatura"
# unique_id: "sensor.temperature_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['temperature']}}"
json_attributes:
- "temperature"
- name: "Wilgotność powietrza"
# unique_id: "sensor.humidity_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['humidity']}}"
json_attributes:
- "humidity"
- name: "Poziom wody"
# unique_id: "sensor.water_sensor"
json_attributes_path: "$.response.system"
value_template: "{{value_json['water']}}"
json_attributes:
- "water"
lamp_switch:
- command: "Lamp switch"
trigger:
platform:
action:
url: http://192.168.43.21/lampSwitch/
I saw solution which uses cURL and command line, but I couldn't find any suiting example.
Note that the rest entities works just fine (shows up at home screen).
Thank you in advance
I use this to launch applications on my Samsung TV. I define my_command in Configuration.yaml, then use:
/bin/bash -c "/usr/bin/curl -X POST 'http://<<My_IP>>:8001/api/v2/applications/'{{ variables.my_command }}"
I call this from a button and pass a variable that defines the application that I want.
I hope this helps.
Update: I got fed up and re-do everything from the ground-up and it fixes itself.
I have a github pages site built with Jekyll and Chirpy theme.
Locally, it runs great.
However when deployed on Github Pages there are a few directories that return the 404 page even though the path is valid and there is an index.html file in it.
Example:
https://catmandx.github.io/posts/Wgel-CTF-Writeup/ display normally
https://catmandx.github.io/tags/cmc/index.html returns 404
http://127.0.0.1:4000/tags/cmc/index.html display correcly.
I have temporarily make the repo public, it's here: https://github.com/catmandx/catmandx.github.io
I have been banging my head for a few hours now. I have tried committing and pushing again to re-run Actions, manually editing the /tags/cmc/index.html file in the gh-pages branch but nothing works.
This is the _config.yml file, not sure if it helps but here:
# The Site Settings
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2017-2019 Cotes Chung
# MIT licensed
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# --------------------------
title: Hoang Nguyen # the main title
tagline: Simple Blog. # it will display as the sub-title
description: >- # used by seo meta and the atom feed
A minimal, portfolio, sidebar,
bootstrap Jekyll theme with responsive web design
and focuses on text presentation.
# fill in the base hostname & protocol for your site, e.g., 'https://username.github.io'
url: 'https://catmandx.github.io'
author: Hoang Nguyen # change to your full name
avatar: /assets/img/avatar.jpg # support internet resources
github:
username: catmandx # change to your github username
#twitter:
# username: twitter_username # change to your twitter username
social:
name: Hoang Nguyen # it will shows as the copyright owner in Footer
email: hhoang.nov.13#gmail.com # change to your email address
links:
# The first element serves as the copyright owner's link
# - https://twitter.com/username # change to your twitter homepage
- https://github.com/catmandx # change to your github homepage
# Uncomment below to add more social links
- https://www.facebook.com/whohoi
# - https://www.linkedin.com/in/username
# google_site_verification: google_meta_tag_verification # change to your verification string
# --------------------------
# Only if your site type is GitHub Project sites and doesn't have a custom domain,
# change below value to '/projectname'.
baseurl: ''
# Change to your timezone › http://www.timezoneconverter.com/cgi-bin/findzone/findzone
timezone: Asia/Ho_Chi_Minh
google_analytics:
id: '' # Fill with your Google Analytics ID
pv:
# The Google Analytics pageviews switch.
# DO NOT enable it unless you know how to deploy the Google Analytics superProxy.
enabled: false
# the next options only valid when `google_analytics.pv` is enabled.
proxy_url: ''
proxy_endpoint: ''
cache: false # pv data local cache, good for the users from GFW area.
disqus:
comments: false # boolean type, the global switch for posts comments.
shortname: '' # Fill with your Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
# Prefer color scheme setting.
#
# Note: Keep empty will follow the system prefer color by default,
# and there will be a toggle to switch the theme between dark and light
# on the bottom left of the sidebar.
#
# Available options:
#
# light - Use the light color scheme
#
# dark - Use the dark color scheme
#
theme_mode: # <light|dark>
# boolean type, the global switch for ToC in posts.
toc: true
paginate: 10
kramdown:
syntax_highlighter: rouge
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
css_class: highlight
# default_lang: console
span:
line_numbers: false
block:
line_numbers: true
start_line: 1
# DO NOT change this unless you're a Pro user on Jekyll and Web development,
# or you think you're smart enough to change other relevant URLs within this template.
permalink: /posts/:title/
collections:
tabs:
output: true
sort_by: order
defaults:
-
scope:
path: '' # An empty string here means all files in the project
type: posts
values:
layout: post
comments: true # Enable comments in posts.
toc: true # Display TOC column in posts.
breadcrumb:
-
label: Posts
url: /
-
scope:
path: _drafts
values:
comments: false
-
scope:
path: index.html
values:
breadcrumb:
-
label: Posts
-
scope:
path: tags
values:
breadcrumb:
-
label: Home
url: /
-
label: Tags
url: /tabs/tags/
-
scope:
path: categories
values:
breadcrumb:
-
label: Home
url: /
-
label: Categories
url: /tabs/categories/
-
scope:
path: ''
type: tabs # see `site.collections`
values:
layout: page
dynamic_title: true # Hide title in mobile screens.
breadcrumb:
-
label: Home
url: /
sass:
sass_dir: /assets/css
style: compressed
compress_html:
clippings: all
comments: all
endings: all
profile: false
blanklines: false
ignore:
envs: []
exclude:
- vendor
- Gemfile.lock
- Gemfile
- tools
- docs
- README.md
- LICENSE
- example
jekyll-archives:
enabled: [categories, tags]
layouts:
category: category
tag: tag
permalinks:
tag: /tags/:name/
category: /categories/:name/
Update: This is the log, as you can see, the files exists but all the subdirectories in /categories and /tags returns 404:
You can solve this issue by executing bash tools/init.sh
You will also have to run this init.sh every time there is a category/tag created.
My project: https://github.com/sebastian3495/sebastian3495.github.io
My website (current displayed without css rendered): https://sebastian3495.github.io/
How can I have all links point to my github project instead of localhost?
What am I missing? I am new to jekyll and web development isn't my strongest point, so please bear with me.
EDIT: My config file hasbeen updated
_config.yml
title: Blog Title
description: Describe your website here.
# put your disqus here
remote_theme: aron-bordin/neo-hpstr-jekyll-theme
disqus_shortname:
reading_time: true # if true, shows the estimated reading time for a post
words_per_minute: 200
logo: images/logo.png # logo visible in the topbar
excerpt_separator: <!--more-->
url: https://sebastian3495.github.io
# draw your top menu here
# each item must have a title and a url.
# To list post categories. use type: 'categories'
# To create sub categories. add a submenu item
# See the example
menu:
- title: 'Home'
url: '/'
- title: 'Fork'
url: 'http://github.com/aron-bordin/neo-hpstr-jekyll-theme'
- title: 'Install'
url: 'http://github.com/aron-bordin/neo-hpstr-jekyll-theme#installation'
- title: 'Tags'
url: '/tags'
- title: 'Categories'
url: '/categories'
type: 'categories'
- title: 'Favorites'
url: '#'
submenu:
- title: 'Code Highlighter'
url: '/intro/code-highlighting-post/'
- title: 'Sample Post'
url: '/intro/sample-post/'
# Owner/author information
owner:
name: Sebastian Nielsen
site: http://aronbordin.com
avatar: images/avatar.jpg
bio: "TEsting stuff off! . :D . It shouldn't be super long but a good two sentences or two should suffice."
email: you#email.com
# Twitter nick for use in Twitter cards and follow button.
twitter: aron_bordin # if no twitter in this config, the twitter follow button will be removed
# GitHub nick for use in follow button in author block.
github: aron-bordin
# Twitter account associated with the site if different from owner/author twitter account.
# Used in Twitter cards.
twitter:
# Social networking links used in author block underneath posts. Update and remove as you like.
social:
- title: "github"
url: "https://github.com/aron-bordin"
- title: "linkedin"
url: "https://br.linkedin.com/in/aronbordin"
- title: "youtube"
url: "https://www.youtube.com/channel/UCfnSek-9HPWOx5e2pH7VFgg"
# Background image to be tiled on all pages
background:
# Analytics and webmaster tools stuff goes here
google_analytics:
google_verify:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify:
# http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
timezone: America/New_York
locale: en_US
future: true
highlighter: rouge
markdown: kramdown
sass:
sass_dir: _sass
style: compressed
# https://github.com/mojombo/jekyll/wiki/Permalinks
permalink: /:categories/:title/
# Amount of post to show on home page
paginate: 5
# if true, shows the floatting share buttons
float_share: true
# Octopress
# Default extensions
post_ext: md
page_ext: md
# Found in _templates/
post_layout: post
page_layout: page
# Format titles with titlecase?
titlecase: true
include: [".htaccess", "C:/Users/sebas/Documents/GitHub/Sebastian_Nielsen_Blog/_includes"]
exclude: ["demo/*", "lib", "config.rb", "Capfile", "config", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"]
plugins: ["jekyll-paginate", "jekyll-remote-theme"]
theme: neo-hpstr-jekyll-theme
Since you're using a third-party theme, I understand you followed the instructions to run jekyll build locally first and then uploaded the contents of your ./_site directory.
The issue here is that recent versions of Jekyll automatically sets the url key to http://localhost:4000 when you build locally.
You have two basic choices:
To use both third-party themes and third-party plugins on GitHub Pages, you need to build the site locally by changing the JEKYLL_ENV env to production (or anything else other than development)
JEKLL_ENV=production bundle exec jekyll build
(on Windows, you need to run set JEKLL_ENV=production first followed by the jekyll incantation.
To use a third-party theme that requires only official plugins, and the theme-repo itself is also hosted on GitHub, you can use the remote_theme feature (included by default in recent versions of gem "github-pages"):
# _config.yml
remote_theme: aron-bordin/neo-hpstr-jekyll-theme
Refer: https://github.com/benbalter/jekyll-remote-theme for details on the jekyll-remote-theme plugin usage.
As you're pushing locally generated code, you need to :
In _config.yml, set url: https://sebastian3495.github.io
Run a bundle exec jekyll build
Push the resulting code to github.
I successfully have my Protractor tests running on SauceLabs, Although I would like to be able to send the names of my tests up to the service, for example all my tests are being grouped by browser name.
Is there a way I can pass the test names up to SauceLabs?
I've done this using Selenium for Python. However, I understand that with Protractor, you'd edit your conf.js file so that the capabilities option would be contain a name field with the name of your test. I also suggest using the build field to know what build of your code you are using:
capabilities: {
name: 'whatever name',
build: 'whatever build',
// Anything else you need
}
The name and build fields are cross platform.
If, during your test, you have the SauceLabs sessionId, then its as simple as sending a JSON packet to the REST API.
curl https://saucelabs.com/rest/v1/users/USERNAME -u YOUR_USERNAME:ACCESS_KEY
You can probably test this by starting a manual SauceLabs session, getting the session ID from it, and then manually sending the API request in a browsser JSON REST client such as 'Postman'.
You might only have to add something like this:
var testName = 'Testing'; //Change Project's name here in order to be identified in BrowserStack
// An example configuration file.
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://xxxxx:xxxxx#ondemand.saucelabs.com:80/wd/hub',
//seleniumAddress: 'http://hub.browserstack.com/wd/hub',
//seleniumAddress: 'http://127.0.0.1:4723/wd/hub',//Local Appium
// Capabilities to be passed to the webdriver instance.
multiCapabilities: [
{
name: testName,
platformName: 'iOS',
platformVersion: '7.1',
browserName: '',
app: 'safari',
deviceName: 'iPhone Simulator',
'appium-version': "1.4.0",
username: 'xxxxxx',
accessKey: 'xxxxx'
}
,
{
name: testName,
platformName: 'Android',
platformVersion: '4.4',
browserName: 'Browser',
deviceName: 'Android Emulator',
'appium-version': "1.4.0",
username: 'xxxxx',
accessKey: 'xxxxx'
}
],
You may run this little script:
browser.executeScript("sauce:job-name=" + name )
It's generally useful if you want to dynamically set the name during or right before the start of the tests.
Obviously it is not that simple. Let's start from the beginning: I'm working on a shared project and yesterday I've been asked to add the plugin mgI18n. I followed the readme file step by step, but when it came down to run the command line to create the table used by the plugin, I got this:
database "" does not exists
I searched it, and I found out that sfConfig::get('app_mgI18nPlugin_connection'); returned an empty value. It was weird, because I've done every step right, setting the value in my app.yml and clearing symfony cache, so I logged sfConfig::getAll(); and found out that the only values for 'app_' stored here were the ones from the file app.yml in the plugin folder of kdDoctrineGuardFacebookConnectPlugin. I've already tried removing that file and clearing the cache, obtaining only to lose these values.
Here is the file contents:
project/apps/frontend/config/app.yml
all:
#other values
facebook:
appId: yyy
secret: yyy
cookie: true
script_lang: fr_FR
perms: email
mgI18nPlugin:
connection: doctrine
cultures_available:
fr: Français
en: English
it: Italiano
de: Deutsch
project/plugins/kdDoctrineGuardFacebookConnectPlugin/config/app.yml
all:
facebook:
appId: xxx
secret: xxx
cookie: true
script_lang: fr_FR
perms: email
and this is what I get when I log sfConfig::getAll(); :
array('app_facebook_appId' => 'xxx',
'app_facebook_secret' => 'xxx',
'app_facebook_cookie' => true,
'app_facebook_script_lang' => 'fr_FR',
'app_facebook_perms' => 'email',
)
Why the values for the main app.yml are not loaded? How do I correct this behaviour?
Thank you all in advance for your help, if you need more specifics I'll glady add them
If I understood you well you are in a command line task context (some sfTask). Symfony tasks by default do not run in application context. In most cases just call your task as
./symfony namespace:name --application=frontend
and you will have your configs.
If it is your own task just add it an option with default value in your configure method:
$this->addOptions(array(
new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'frontend'),
...
)
Plugin settings are loaded correctly, because plugins are configured per project not application (you enable them in ProjectConfiguration, not generated frontendConfiguration class)