I have mercurial repository. There is .hgignore file:
λ ~/workspace/kompgrafika/nurbs/ cat .hgignore
syntax: regexp
^Makefile
^bin/.*$
CMakeFiles/.*$
^CMakeCache\.txt
^cmake_install\.cmake
There is directory named CMakeFiles that I want to ignore:
λ ~/workspace/kompgrafika/nurbs/ tree CMakeFiles
CMakeFiles
├── 3dfractals.dir
│ ├── build.make
│ ├── cmake_clean.cmake
│ ├── CXX.includecache
│ ├── DependInfo.cmake
│ ├── depend.internal
│ ├── depend.make
│ ├── flags.make
│ ├── link.txt
│ ├── progress.make
│ └── src
│ ├── DisplayControl.cpp.o
│ ├── Drawer.cpp.o
│ ├── main.cpp.o
│ ├── PointFileReader.cpp.o
│ ├── PointGenerator.cpp.o
│ └── Program.cpp.o
├── CMakeCCompiler.cmake
├── cmake.check_cache
├── CMakeCXXCompiler.cmake
├── CMakeDetermineCompilerABI_C.bin
├── CMakeDetermineCompilerABI_CXX.bin
├── CMakeDirectoryInformation.cmake
├── CMakeOutput.log
├── CMakeSystem.cmake
├── CMakeTmp
│ └── CMakeFiles
│ └── cmTryCompileExec.dir
├── CompilerIdC
│ ├── a.out
│ └── CMakeCCompilerId.c
├── CompilerIdCXX
│ ├── a.out
│ └── CMakeCXXCompilerId.cpp
├── Makefile2
├── Makefile.cmake
├── progress.marks
└── TargetDirectories.txt
7 directories, 31 files
But running hg status it does not ignore 3dfractals.dir for some reason.
λ ~/workspace/kompgrafika/nurbs/ hg st
A .hgignore
A docs/pol_10.wings
? CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o
? CMakeFiles/3dfractals.dir/src/Drawer.cpp.o
? CMakeFiles/3dfractals.dir/src/PointFileReader.cpp.o
? CMakeFiles/3dfractals.dir/src/PointGenerator.cpp.o
? CMakeFiles/3dfractals.dir/src/Program.cpp.o
? CMakeFiles/3dfractals.dir/src/main.cpp.o
I am using:
λ ~/workspace/kompgrafika/nurbs/ hg --version
Mercurial Distributed SCM (version 2.0.2+5-1f9f9b4c2923)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I also tried changing CMakeFiles/.*$ to ^CMakeFiles$. No results.
Any ideas what's wrong?
Hmm, it works here:
$ cat .hgignore
syntax:regexp
^Makefile
^bin/.*$
CMakeFiles/.*$
^CMakeCache\.txt
^cmake_install\.cmake
$ hg init
$ mkdir -p $(dirname CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o)
$ touch CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o
$ touch CMakeFiles/cmake.check_cache
$ hg status
? .hgignore
$ hg status -A
? .hgignore
I CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o
I CMakeFiles/cmake.check_cache
This is with Mercurial 2.0.2+59, so it should work the same as your version.
One thing that can trip up hg status in the way you see is the inotify extension. As mentioned on its wiki page, it's still to be considered experimental because it's still buggy. Check for inotify with
$ hg showconfig extensions.inotify
and disable it if necessary. If the extension is loaded from your own configuration file (check with hg showconfig --debug) then you can just remove the line that loads it. If it's loaded in a system-wide config file that you cannot change, then add
[extensions]
inotify = !
to your own config file to disable it.
I'm on Windows, but usually
CMakeFiles/*
would do the trick for me...
Related
My trainings were inspired by the following (one of the questions didn't work):
Using CSS when converting Markdown to PDF with Pandoc
How to convert Markdown + CSS -> PDF?
How to compile all .md files in a directory into a single .pdf with pandoc, while preserving YAML header data?
And the tutorial:
Converting Markdown to Beautiful PDF with Pandoc
My platform:
Endeavour OS (derived of Arch Linux)
KDE Plasma
MikTeX
Terminator
I have Lua installed.
My goal is to:
convert multiple Markdown to one single PDF page (not multiple PDF pages)
include multiple CSS files;
use LaTeX macros (for example: $\LaTeX$ on Markdown file)
to preserve YAML header data
I tried to run the command:
$ cd diários
$ pandoc -s \
# Because of few LaTeX macros on one Markdown file
-f markdown \
# I need to use HTML 5, but the result warned it is not compatible with the format output (xelatex)
-t html5 \
# Accoridng to https://jdhao.github.io/2019/05/30/markdown2pdf_pandoc/
--pdf-engine=xelatex \
--self-contained \
# Multiple CSS files
--css ../assets/css/colours.css,../assets/css/fonts.css,../assets/css/global.css \
# To preserve YAML data
--lua-filter=../scripts/demote.lua \
# Multiple Markdown files
-V geometry:margin=1in \
*.md \
# Output as PDF
-o combined.pdf
Tree
.
├── assets
│ ├── css
│ │ ├── colours.css
│ │ ├── fonts.css
│ │ ├── global.css
│ ├── fonts
│ │ ├── Latin Modern
│ │ │ ├── LM-bold-italic.woff
│ │ │ ├── LM-bold-italic.woff2
│ │ │ ├── LM-bold.woff
│ │ │ ├── LM-bold.woff2
│ │ │ ├── LM-italic.woff
│ │ │ ├── LM-italic.woff2
│ │ │ ├── LM-regular.woff
│ │ │ └── LM-regular.woff2
│ │
│ ├── images
│ │ ├── 2021-12-27-camiseta-do-hackathon-do-itau.jpeg
│ │ ├── emojis
│ │ │ ├── 32
│ │ │ │ ├── 1-emoji-excited.png
│ │ │ │ ├── 2-emoji-happy.png
│ │ │ │ ├── 3-emoji-neutral.png
│ │ │ │ ├── 4-emoji-sad.png
│ │ │ │ └── 5-emoji-down.png
│ ├── videos
│ │ └── 2021-12-27 – Comboio no temrinal em dois monitores.mp4
├── diários
│ ├── 2021-05-28.md
│ ├── 2021-12-25.md
│ ├── 2021-12-26.md
│ ├── 2021-12-27.md
│ ├── 2021-12-28.md
│ ├── 2021-12-29.md
│ ├── 2021-12-30.md
│ ├── 2021-12-31.md
│ ├── 2022-01-01.md
│ ├── 2022-01-02.md
│ ├── 2022-01-03.md
│ ├── 2022-01-04.md
│ ├── 2022-01-05.md
│ ├── 2022-01-06.md
│ ├── 2022-01-07.md
│ ├── 2022-01-10.md
│ ├── 2022-01-11.md
├── scripts
│ └── demote.lua
Errors
pdf-engine xelatex is not compatible with output format html5
And with -t html5, another error:
Error running filter ../scripts/demote.lua:
[string "--[[..."]:227: Constructor for Header failed: [string "--[[..."]:258: attempt to index a nil value (local 'x')
stack traceback:
[C]: in function 'error'
[string "--[[..."]:227: in field 'Header'
../scripts/demote.lua:11: in function 'Pandoc'
With --lua-filter=../scripts/demote.lua removed, it almost worked, but it did not capture the CSS files. I believe the problem is in the pdf-engine=xelatex.
I try to play following playbook against localhost to provision Vagrant machine
---
- hosts: all
become: yes
roles:
- base
- jenkins
I have cloned necessary roles from github and they resides in a relative path roles/{role name}
Executing following command: ansible-playbook -i "localhost," -c local playbook.yml outputs this error:
==> default: ERROR! the role 'geerlingguy.java' was not found in /home/vagrant/provisioning/roles:/home/vagrant/provisioning:/etc/ansible/roles:/home/vagrant/provisioning/roles
==> default:
==> default: The error appears to have been in '/home/vagrant/provisioning/roles/jenkins/meta/main.yml': line 3, column 5, but may
==> default: be elsewhere in the file depending on the exact syntax problem.
==> default:
==> default: The offending line appears to be:
==> default:
==> default: dependencies:
==> default: - geerlingguy.java
==> default: ^ here
I cloned the missing dependency from github, and tried to reside it in relative path of roles/java and roles/geerlingguy/java, but either didn't solve the problem, and error stays the same.
I want to keep all roles locally in the synced provisioning folder, without using ansible-galaxy runtime, to make the provisioning method as self contained as possible.
Here is the provision folder structure as it is now
.
├── playbook.yml
└── roles
├── base
│ └── tasks
│ └── main.yml
├── java
│ ├── defaults
│ │ └── main.yml
│ ├── meta
│ │ └── main.yml
│ ├── README.md
│ ├── tasks
│ │ ├── main.yml
│ │ ├── setup-Debian.yml
│ │ ├── setup-FreeBSD.yml
│ │ └── setup-RedHat.yml
│ ├── templates
│ │ └── java_home.sh.j2
│ ├── tests
│ │ └── test.yml
│ └── vars
│ ├── Debian.yml
│ ├── Fedora.yml
│ ├── FreeBSD.yml
│ ├── RedHat.yml
│ ├── Ubuntu-12.04.yml
│ ├── Ubuntu-14.04.yml
│ └── Ubuntu-16.04.yml
└── jenkins
├── defaults
│ └── main.yml
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── README.md
├── tasks
│ ├── main.yml
│ ├── plugins.yml
│ ├── settings.yml
│ ├── setup-Debian.yml
│ └── setup-RedHat.yml
├── templates
│ └── basic-security.groovy
├── tests
│ ├── requirements.yml
│ ├── test-http-port.yml
│ ├── test-jenkins-version.yml
│ ├── test-plugins-with-pinning.yml
│ ├── test-plugins.yml
│ ├── test-prefix.yml
│ └── test.yml
└── vars
├── Debian.yml
└── RedHat.yml
You should install or clone all required roles in the /roles folder (or in the system folder)
ansible-galaxy install -p ROLES_PATH geerlingguy.java
should fix this specific problem.
However, the best practice should be the use of a requirements.yml file where you require all the needed roles and then install them with ansible-galaxy directly in your playbook.
- name: run ansible galaxy
local_action: command ansible-galaxy install -r requirements.yml --ignore-errors
Simple symbolic link works like a charm without any installations:
$ mkdir /home/USER/ansible && ln -s /home/USER/GIT/ansible-root/roles
Here is the solution: the required path for the role is roles/geerlingguy.java/, not roles/geerlingguy/java/
Playing with Lazybones for the first time. I've put together a simple project which attempts to include a single sub-template.
Here is the project structure:
.
├── build.gradle
├── gradlew
├── gradlew.bat
├── README.md
└── templates
├── groovy-lambda
│ ├── build.gradle
│ ├── lazybones.groovy
│ ├── README.md
│ ├── src
│ │ ├── main
│ │ │ ├── groovy
│ │ │ │ └── .retain
│ │ │ └── resources
│ │ │ └── .retain
│ │ └── test
│ │ ├── groovy
│ │ │ └── .retain
│ │ └── resources
│ │ └── .retain
│ └── VERSION
└── subtmpl-groovy-lambda-main-class
├── GroovyLambdaMainClass.groovy
├── lazybones.groovy
└── VERSION
And I'm including the sub-template like so
lazybones {
template "groovy-lambda" includes "groovy-lambda-main-class"
}
The sub-template gets packaged in the main artefact archive:
.
├── build.gradle
├── .lazybones
│ ├── groovy-lambda-main-class-template-1.0-SNAPSHOT.zip
│ └── stored-params.properties
├── README.md
└── src
├── main
│ ├── groovy
│ └── resources
└── test
├── groovy
└── resources
However the sub-template never gets processed at template execution time i.e. the sub-templates lazybones.groovy script doesn't seem to get run.
The whole project is available here on GitHub. To reproduce the issue do:
git#github.com:eddgrant/lazybones-template-aws-groovy-lambda.git
cd lazybones-template-aws-groovy-lambda.git
./gradlew installAllTemplates
cd /tmp
lazybones --verbose create groovy-lambda 1.0-SNAPSHOT groovy-lambda
I'm probably missing something trivial but can't quite figure it out. Most grateful for any pointers.
Everything is working as expected. Sub templates are only used by the lazybones generate command, which in turn works only once you have created a Lazybones-based project.
The classic example is something like a Grails or Rails project in which you would use the generate command to create new controllers or domain classes.
I have folders with test and source files mixed together
├── module-x
│ ├── module-x.hbs
│ ├── module-x.js
│ ├── module-x.less
│ └── module-x.test.js
├── module-y
│ ├── module-y.hbs
│ ├── module-y.js
│ ├── module-y.less
│ └── module-y.test.js
I have gulp running browserSync with some globs to watch files and reload the app. I can't find a glob that will watch the .js files but ignore the .test.js ones
This ones worked for me
glob: path.resolve(root + "/**/!(*.test).js"),
I'm trying to create a set of project pages using Github Pages. My main page is a copy of my project's README, which I generated through Github's auto-page generator. Under Project Health Metrics, I link to two HTML reports: one is a CodeNarc report (at health/codenarc/main.html) and the other is a Jacoco report (at health/jacoco/index.html).
The CodeNarc report renders fine, but the Jacoco report doesn't as it's not able to load the stylesheet and other resources kept in another directory. I'm keeping everything on a gh-pages branch with a directory structure that looks like this:
.
├── Gemfile
├── Gemfile.lock
├── _config.yml
├── _site
├── bin
├── build
├── build.gradle
├── config
├── docs
├── gradle.properties
├── health
├── images
├── index.html
├── javascripts
├── params.json
├── src
└── stylesheets
My health directory tree appears like this:
health
├── codenarc
│ ├── integrationTest.html
│ ├── main.html
│ └── test.html
├── html
│ └── projectHealth.html
└── jacoco
├── .resources
│ ├── branchfc.gif
│ ├── branchnc.gif
│ ├── branchpc.gif
│ ├── bundle.gif
│ ├── class.gif
│ ├── down.gif
│ ├── greenbar.gif
│ ├── group.gif
│ ├── method.gif
│ ├── package.gif
│ ├── prettify.css
│ ├── prettify.js
│ ├── redbar.gif
│ ├── report.css
│ ├── report.gif
│ ├── session.gif
│ ├── sort.gif
│ ├── sort.js
│ ├── source.gif
│ └── up.gif
├── .sessions.html
├── com.github.tagc.semver
│ ├── SemVerPlugin$_apply_closure1.html
│ ├── SemVerPlugin.groovy.html
│ ├── SemVerPlugin.html
│ ├── SemVerPluginExtension.groovy.html
│ ├── SemVerPluginExtension.html
│ ├── Version$Builder.html
│ ├── Version$Category.html
│ ├── Version$Parser.html
│ ├── Version.groovy.html
│ ├── Version.html
│ ├── index.html
│ └── index.source.html
└── index.html
If it helps, you can explore the tree and check out all the files from my Github repository.
I would like the Jacoco report to be able to access the resources in the .resources folder under health/jacoco, but it doesn't seem able to and I'm not quite sure why. I've tried playing around with this a lot on a private instance running on localhost through Jekyll.
Problem solved, thanks to help from some people in IRC and a lot of playing around.
Jekyll ignores any folders that are hidden (e.g. prepended with a dot or underscore), so it wasn't processing health/jacoco/.resources.
I got around this issue by including include: ['.resources'] in _config.yml. Don't forget to push this file to the remote gh-pages branch on Github, as Github uses this to determine what it processes as well.
The Jacoco report now renders properly because it can access the stylesheets and other resources it depends on.