following a tutorial and edited and pushed my changes. It shows the changes correctly in the repository but nothing changes on the web page.
https://github.com/StephanBKetterer/StephanBKetterer.github.io
Some errors in your _config.yml :
The first broke your last two builds as seen here and certainly in your config panel.
author:
...
github :"StephanBKetterer"
Must be :
author:
...
github : "StephanBKetterer"
Always one space after colon.
The second emits a warning :
Defaults: An invalid front-matter default set was found: blah blah
defaults:
...
#_pages
- scope:
path: ""
type: pages
values:
layout: single
author_profile: true
Must be indented like this:
defaults:
...
#_pages
- scope:
path: ""
type: pages
values:
layout: single
author_profile: true
Related
I am setting up the EFK stack for my containerized environment. I have given /var/lib/docker/containers/*.log to get logs from all the containers and it is working fine.
Now I saw some strange logs generated by one of my containers and I decided to not show them on Kibana dashboard.
#timestamp August 30th 2019, 13:44:59.136
_id XXX
_index filebeat-6.0.1-2019.08.30
_score -
_type doc
beat.namexyz xyz.com
beat.version 6.0.1
container.name mycontainer
property mycontainerproperty
log:
How can I hide the entries for this container?
I thought not to take the logs from this container in the first place but the container ID is not going to be the same every time. so excluding it in the input section seems impossible.
Please let me know if anyone has any idea here. Is there any grok pattern that I can use to hide entries for this container?
So as stated from the OP in the comments the events that should be dropped start with the value DEBU: in the log field.
Here's a logstash filter (untested) that checks if the value of the log field matches this criteria. If so, the event will dropped which means it will not be indexed into Elasticsearch.
filter{
grok{
match => { "log" => "^DEBU:.*" }
tag_on_failure => [ "event_should_not_be_dropped" ]
}
if "event_should_not_be_dropped" not in [tags]{
drop { }
}
}
With the grok plugin we check if the value of the log field start with DEBU:. If not, the event will be tagged. If the event is not tagged the whole event will be dropped.
I hope I could help you.
In case anyone is looking for a solution to the above situation-
I edit my filebeat.yml and put the drop filter/processor.
My filebeat.yml looks like-
data:
kubernetes.yml: |-
- type: log
paths:
- /var/lib/docker/containers/*/*.log
json.message_key: log
json.keys_under_root: true
multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: true
multiline.match: 'after'
scan_frequency: 20s
processors:
- add_kubernetes_metadata:
in_cluster: true
namespace: ${POD_NAMESPACE}
include_annotations:
- "build"
- "branch-name"
- drop_event.when:
or:
- equals:
property: "mycontaininerproperty"
- equals:
label: "mycontainerlabel"
so now if any of the log entries contains property="mycontainerproperty" or label="mycontainerlebel". It will drop those entries.
I have an Rmd file that renders into html correctly almost all of the time. However, it does not render correctly when pandoc (used in the rendering process) finds 4 spaces in the html and at that point, interprets that I want to render a markdown code snippet instead of html.
I have been told that I can turn off the markdown_in_html_blocks feature by doing something like this:
pandoc -f markdown-markdown_in_html_blocks.
I have tried calling pandoc directly rather than it being called implicitly by
rmarkdown::render()
but couldn't get that syntax to work and being able to specify this option (-markdown_in_html_blocks) directly as I call render() is preferred. Here is the latest of I have tried without success:
Base case: works but HTML output file is malformed / has a code block instead of the data that I want to display in the table.
render("reports/Pacing.Rmd")
Attempted fix: not working
rmdFmt <- rmarkdown_format("-markdown_in_html_blocks")
pandocOpts <- pandoc_options(to = "html", from = rmdFmt)
render("reports/Pacing.Rmd",output_format = "html_document",output_file = NULL, output_dir = NULL, output_options = pandocOpts)
Error message: Error in (function (toc = FALSE, toc_depth = 3, toc_float = FALSE, number_sections = FALSE, :
argument 1 matches multiple formal arguments
I have tried other syntax to express that I want to turn off markdown_in_html_blocks but no luck.
Given the following document test.Rmd...
---
title: Test
output: html_document
---
<table>
<tr>
<td>*one*</td>
<td>[a link](https://google.com)</td>
</tr>
</table>
...you can disable the markdown_in_html_blocks extension via
rmarkdown::render("test.Rmd",
output_options = list(md_extensions = "-markdown_in_html_blocks"))
md_extensions is one of the arguments that can be passed to rmarkdown::html_document (see ?rmarkdown::html_document for other arguments).
That seems to be an open issue, but a simpler way to turn off/on such a feature is to directly update the YAML in Rmd file. This should work in your case:
output:
html_document:
pandoc_args: [
"-f", "markdown-markdown_in_html_blocks"
]
In routing.yml I have defined a new route for categories:
categories:
path: '/{slug}/'
defaults:
_controller: 'Bolt\Controllers\Frontend::taxonomy'
taxonomytype: categories
But Bolt still generates url for categories following the general pattern:
taxonomylink:
path: '/{taxonomytype}/{slug}'
defaults:
_controller: 'Bolt\Controllers\Frontend::taxonomy'
requirements:
taxonomytype: 'Bolt\Controllers\Routing::getAnyTaxonomyTypeRequirement'
E.g.: for category van-gogh the generated url is /categories/van-gogh, but I would like to generate urls like /van-gogh. I would like to leave unchanged other taxonomy types: /tags/hermitage should not become /hermitage, but it should stay the same.
How can I have Bolt do this? Thank you :)
Set up an early route similar to this:
taxonomybinding:
path: '/{taxonomytype}'
defaults:
_controller: 'Bolt\Controllers\Frontend::taxonomy'
requirements:
taxonomytype: 'Bolt\Controllers\Routing::getAnyTaxonomyTypeRequirement'
Set the taxonomytype to category instead of categories.
PS You should define some requirements, otherwise /hermitage would match, too, resulting in an error, because there is no category with that slug.
I'm trying to set up a theme system for my project, what I have currently takes a theme file in stylus like theme\default.theme.styl that only includes variables storing colors and applies it to whatever other component style files we have included (e.g. button.styl). The idea is that I can have more than one theme file, say blue.theme.styl and red.theme.styl and gulp will output two separate css files based on the component styling. So I'd get button.blue.styl and button.red.styl as two separate files.
We want to be able to tell gulp which themes to compile through the CLI, so I set up the gulp task to take a build option of 'theme', and I'm using gulp-rename to add the theme name to the output files. But, I can't get gulp to output multiple theme files if I give it more than one theme option.
TaskManager.createTask
name: 'css'
description: 'Build the component CSS files'
options: buildOptions.concat
name: 'theme'
type: 'Array'
description: 'themes to compile'
default: 'default'
supported: ['default', 'blue', 'red']
hide: true
fn: ->
themeName = TaskManager.getArg('theme')
DEST = 'dest'
nib = require 'nib'
stream = gulp.src ["src/**/*.styl", "!src/theme/*", "!src/global/*"]
.pipe(plugins.plumber(errorHandler: TaskManager.error))
.pipe(plugins.stylus
use: [
nib()
]
include: [
'src/util'
'src/global'
'src/theme'
]
import: themeName.map (val) -> "#{val}.theme"
)
.pipe(rename (path) ->
path.extname = ".#{themeName}.css"
undefined
)
.pipe(plugins.filelog 'css')
.pipe(gulp.dest 'dest')
This works as expected if I give it only one option at build so that gulp --theme='blue' will output button.blue.css with the appropriate theme styling. But if I give it more than one option like gulp --theme='blue,red' I get files named button.blue,red.css that have whichever theme's file variables were included last as the colors that were applied.
Makes sense from what I understand of gulp and gulp-rename, but I want to be able to split the pipe at this point to get two different files. I don't want to actually copy the files into a new directory, and solutions that manually create multiple streams to concatenate are not a satisfactory since I might only have one theme or there might be twelve, and I don't want to have to edit the build file to add new themes. So how can I get multiple files compiled separately out of one stream?
Turns out it works to just return an array of streams:
TaskManager.createTask
name: 'css'
description: 'Build the component CSS files'
options: buildOptions.concat
name: 'theme'
type: 'Array'
description: 'themes to compile'
default: 'default'
supported: ['default', 'blue', 'red']
hide: true
fn: ->
themes = TaskManager.getArg('theme')
DEST = 'dest/components'
nib = require 'nib'
stream = []
createTask = (themeName) ->
return gulp.src ["src/**/*.styl", "!src/theme/*", "!src/global/*"]
.pipe(plugins.plumber(errorHandler: TaskManager.error))
.pipe(plugins.stylus
use: [
nib()
]
include: [
'src/util'
'src/global'
'src/theme'
]
import: "#{themeName}.theme"
)
.pipe(rename (path) ->
path.extname = ".#{themeName}.css"
undefined
)
.pipe(plugins.filelog 'css')
.pipe(gulp.dest 'dest')
themes.map (name) ->
task = createTask name
stream.push task
return stream
I wanted to create a 3 level dijit.Tree, like that:
-root
|
--level1
|
--level2
I thought it would be really simple since there's a code snippet in this tutorial (example 1). But somehow I manage to fail.
This is my dojo code (variable names are in Polish, I hope it's not a problem):
modelRaportow = new dijit.tree.ForestStoreModel({
store: new dojo.data.ItemFileReadStore({
url: "logika/getJSON/getStatusRaportow.php"
}),
query: {typ: 'galaz'},
rootId: 'statusRaportuRoot',
rootLabel: 'Status raportu',
childrenAttrs: 'raporty'
});
drzewoRaportow = new dijit.Tree({
openOnClick: true,
model: modelRaportow,
showRoot: true,
persist: false
}, "target-status-raportow");
drzewoRaportow.startup();
This is my JSON returned by logika/getJSON/getStatusRaportow.php (again, names are in Polish):
{
"identifier":"id",
"label":"status",
"items": [
{"id":0,"status":"zaakceptowane","typ":"galaz"
"raporty":[{"_reference":1},{"_reference":2},{"_reference":3}]},
{"id":1,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport0","typ":"lisc"},
{"id":2,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":1,"status":"Raport1","typ":"lisc"},
{"id":3,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport2","typ":"lisc"},
{"id":4,"status":"odrzucone","typ":"galaz"
"raporty":[{"_reference":5},{"_reference":6},{"_reference":7}]},
{"id":5,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":1,"status":"Raport3","typ":"lisc"},
{"id":6,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport4","typ":"lisc"},
{"id":7,"data":"24-10-2011","wykonujacy":"cblajszczak","idKlienta":3,"status":"Raport5","typ":"lisc"}
]}
And finally, this is what I'm getting: img - root node and lvl 1 nodes returned by query, no child nodes.
The question is - where is my mistake? Can anyone see it?
You have no comma between the typ and raporty value pair.
I have a partial answer: by stepping through the code in a similar situation, I've discovered that it expects childrenAttrs to be an array, so it should be:
childrenAttrs: ['raporty']
but I still cannot get the third level to appear in my case.