Author: ludek.vodicka
Google chrome “New Tab” settings
Dashboards apps to customize new tab:
- https://www.startme.com/features (*add dashboard)
- https://chrome.google.com/webstore/search/new%20tab
Plugins to customize new tab:
- http://www.dummysoftware.com/newtabchanger.html?ref=chrome (*change CTR+T back to common default URL and use Home button instead for startme)
- https://chrome.google.com/webstore/detail/shortkeys-custom-keyboard/logpjaacgmcbpdkdchjiaagddngobkck/related (*customize home screen shortcut)
- https://chrome.google.com/webstore/detail/new-tab-redirect/icpgjfneehieebagbmdbhnlpiopdcmna/related
Chrome special urls
- chrome://chrome-urls
- chrome://new-tab-page (*common home screen)
- chrome://extensions/shortcuts
Github ssh keys on Windows
1) Install git client
choco install git -Y
2) generate ssh key for your email
ssh-keygen -t rsa -b 4096 -C "[email protected]"
3) enable `OpenSSH Authentication Agent` in Services management
4) add key to agent
ssh-add C:\Users\USER\.ssh\id_ed25519
5) add key to github
type "C:\Users\USER\.ssh\id_ed25519.pub"
6) test key
ssh -T [email protected] Hi USER! You've successfully authenticated, but GitHub does not provide shell access.
Other links
Could not find the Qt platform plugin “xcb” in “”
Full error code:
Library searching paths: - /home/dev/dev/SharedLibraries/qt/plugins qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: linuxfb, minimal, offscreen, vnc.
The reason is that libqxcb.so really missing in the plugins directory. It’s because Qt compilation issue.
It’s necessary to install:
sudo apt-get install libclang-dev #XCB sudo apt-get -y install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev sudo apt-get -y install libxkbcommon-dev libxkbcommon-x11-dev sudo apt-get -y install libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev sudo apt-get -y install libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev sudo apt-get install libxcb-devel libxkbcommon-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel mesa-libGL-devel #D-Bus sudo apt-get install libdbus-1-dev libdbus-glib-1-dev libx11-dev
Note:
It’s necessary to install also correct xinerama packages and dev packages: https://packages.ubuntu.com/search?keywords=xinerama
Google breakpad 2020
Get breakpad
git clone https://chromium.googlesource.com/breakpad/breakpad git clone https://chromium.googlesource.com/external/gyp
Prepare windows
gyp\gyp.bat --no-circular-check breakpad\src\tools\windows\tools_windows.gyp gyp\gyp.bat --no-circular-check src\client\windows\breakpad_client.gyp
Prepare linux
- add src/third_party/lss/linux_syscall_support.h
Fix few things in VS studio in tools_windows
– library output from $(OutDir)lib\$(ProjectName).lib to $(OutDir)\$(ProjectName).lib
– add missing dependency lib Pathcch.lib
– unload gtest, gmock and dump_syms_unittest
Fix few things in VS studio in breakpad_client
– library output from $(OutDir)lib\$(ProjectName).lib to $(OutDir)\$(ProjectName).lib
– unload all unittests projects
– for crash_Generation_client, crash_generation_server, exception_handler, common, crash_generation_app
– c++ -> language -> enable RTTI YES
– c++ -> codegeneration ->runtime library -> MD/MDd
How to extract symbols
The simplest way is to use
dump_syms.exe APP_PATH\APP.exe > app.sym
but this doesn’t prepare correct structure for automatic dmp file evaluation, so we need to use symbolstore.py
Other links
- This blogpost seems to use my original post and add a few more notes: https://github.com/JPNaude/dev_notes/wiki/Using-Google-Breakpad-with-Qt#windows
- My original post: https://blog.inventic.eu/2012/08/qt-and-google-breakpad/
Microsoft defender false positive
Scan library/executable against several AVs:
Report false-positive to Microsoft AV:
Report false positive & other info
Online scanners
Refresh AV definitions
cd %ProgramFiles%\Windows Defender MpCmdRun.exe -removedefinitions -dynamicsignatures MpCmdRun.exe -SignatureUpdate
Notarized Qt binaries for OSX
Notarization sh script for automate whole process. Script is created based on several examples found on the web. Links to these examples can be found bellow (mostly thanks to Logcg.com blog).
Notarize DMG file
#!/bin/sh APPLICATION_PATH=$1 UNDLE_ID="___BUNDLE_ID____" APPLE_USER="___APPLE_USER____" APPLE_PASSWORD="___APLE_APPSPECIFIC_PASSWORD___" echo "Running notarize-app command for file $APPLICATION_PATH" xcrun altool --notarize-app -t osx -f "$APPLICATION_PATH" --primary-bundle-id=$BUNDLE_ID -u $APPLE_USER -p $APPLE_PASSWORD &> notarize-status.txt echo "Notarize-app complete. Result: " cat notarize-status.txt uuid=`cat notarize-status.txt | grep -Eo '\w{8}-(\w{4}-){3}\w{12}$'` echo "Request UUID is $uuid" while true; do echo "checking for notarization..." xcrun altool --notarization-info "$uuid" --username $APPLE_USER --password $APPLE_PASSWORD &> notarize-response.txt echo "Response:" cat notarize-response.txt t=`cat notarize-response.txt | grep "success"` f=`cat notarize-response.txt | grep "invalid"` if [[ "$t" != "" ]]; then echo "notarization done! Stampling application $APPLICATION_PATH" xcrun stapler staple "$APPLICATION_PATH" echo "stapler done!" break fi if [[ "$f" != "" ]]; then echo "$r" return 1 fi echo "not finish yet, sleep 30sec then check again..." sleep 30 done
Notarize .app / .zip
#!/bin/sh APPLICATION_PATH=$1 ZIP_PATH=./application-to-notarize.zip BUNDLE_ID="___BUNDLE_ID____" APPLE_USER="___APPLE_USER____" APPLE_PASSWORD="___APLE_APPSPECIFIC_PASSWORD___" echo "Packing app $APPLICATION_PATH to zip file $ZIP_PATH" ditto -ck --rsrc --sequesterRsrc $APPLICATION_PATH $ZIP_PATH echo "Running notarize-app command for file $ZIP_PATH" xcrun altool --notarize-app -t osx -f "$ZIP_PATH" --primary-bundle-id=$BUNDLE_ID -u $APPLE_USER -p $APPLE_PASSWORD &> notarize-status.txt echo "Notarize-app complete. Result: " cat notarize-status.txt uuid=`cat notarize-status.txt | grep -Eo '\w{8}-(\w{4}-){3}\w{12}$'` echo "Request UUID is $uuid" while true; do echo "checking for notarization..." xcrun altool --notarization-info "$uuid" --username $APPLE_USER --password $APPLE_PASSWORD &> notarize-response.txt echo "Response:" cat notarize-response.txt t=`cat notarize-response.txt | grep "success"` f=`cat notarize-response.txt | grep "invalid"` if [[ "$t" != "" ]]; then echo "notarization done! Stampling application $APPLICATION_PATH" xcrun stapler staple "$APPLICATION_PATH" echo "stapler done!" break fi if [[ "$f" != "" ]]; then echo "$r" return 1 fi echo "not finish yet, sleep 30sec then check again..." sleep 30 done
Useful links:
- commands to notarize app
- https://skyronic.com/app-notarization-for-qt-applications/
- https://successfulsoftware.net/2018/11/16/how-to-notarize-your-software-on-macos/
- https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow
- https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow
- Automating the process:
- how to generate app-specific password:
https://support.apple.com/en-ca/HT204397 - what is hardened runtime:
https://developer.apple.com/documentation/security/hardened_runtime_entitlements - altool cannot be found:
https://forums.developer.apple.com/thread/118045
How to generate new Apple developer certificate
“KeyChain Access application” -> KeyChain access -> Certificate assistant -> Request certificate from authority
- Save the certificate request to disk.
- Open website https://developer.apple.com/account/mac/certificate/distribution/create
- MacOS -> Developer ID
- Developer application -> Next -> Next
- Upoad request file, download generated certificate
- Doubleclick on certificate and import it to Keychain access
Usage
For the first time it’s necessary to use codesign from the OSX directly, not via putty/remote.
Execute
codesign --deep --force --verify --sign "$SIGNNAME" --options "runtime" $APP
and enter keychains passwords and confirm with “Always use” . Next time you can use putty as usual.
Docker compose – caching websites with varnish
https://hub.docker.com/r/eeacms/varnish/
cache_WEBNAME: container_name: cache_WEBNAME image: eeacms/varnish links: - web_WEBNAME environment: BACKENDS: "web_WEBNAME" network_mode: bridge logging: driver: gelf options: gelf-address: udp://127.0.0.1:12201 tag: "{{.Name}}"
Docker links
Docker on Ubuntu 2
https://docs.docker.com/engine/installation/linux/ubuntulinux/#/install-the-latest-version
Windows
http://stackoverflow.com/questions/30496116/how-to-disable-hyper-v-in-command-line
http://serverfault.com/questions/767994/can-you-run-docker-natively-on-the-new-windows-10-ubuntu-bash-userspace
http://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/
Docker articles
http://stackoverflow.com/questions/17236796/how-to-remove-old-docker-containers
https://techoverflow.net/blog/2013/10/22/docker-remove-all-images-and-containers/
http://severalnines.com/blog/mysql-docker-building-container-image
https://docs.docker.com/engine/tutorials/dockerimages/
http://blog.thoward37.me/articles/where-are-docker-images-stored/
Docker images
http://docker4wordpress.org/
Cmder, Cygwin and other
- Console emulator for windows – CMDER
- Cygwin installation package – CYGWIN
- Integrate Cygwin to CMDER
- How to add additional packages to cygwin (apt-cyg….)
- apt-cyg installation (lynx required from Cygwin package)
Incredibuild and “cannot create temporary il file”
This is caused by latest MS security update. After applying these two 3126587 and 3126593 previous versions of Incredibuild stopped working.
Command line error D8037 : cannot create temporary il file
The solution is to uninstall it
https://support.microsoft.com/en-us/kb/3126587
https://support.microsoft.com/en-us/kb/3126593
On Windows 10 the responsible update is KB3135173
Next steps
Also it’s necessary to disable these updates in auto-update!
More info:
QML Notes
Sources
F5 for instant reload,
class UltraView : public QQuickView { protected: void keyPressEvent(QKeyEvent*event) override { if(event->key()==Qt::Key_F5){ auto oldSource=source(); setSource({}); engine()->clearComponentCache(); setSource(oldSource); } } };
F10 and F11 for slowing down animations
else if(event->key()==Qt::Key_F10) { QUnifiedTimer::instance()->setSlowModeEnabled(true); QUnifiedTimer::instance()->setSlowdownFactor(10); } else if(event->key()==Qt::Key_F11) { QUnifiedTimer::instance()->setSlowModeEnabled(false); QUnifiedTimer::instance()->setSlowdownFactor(1); }
QML Live editing
QML Lint
Debugging QML application
Batches, clip, changes and overdraw
SET QSG_VISUALIZE=batches or SET QSG_VISUALIZE=clip or SET QSG_VISUALIZE=changes or SET QSG_VISUALIZE=overdraw qmlviewer test.qml
Links:
Qml & QtQuick
Qt documentation
- QML Data Models, Qml Model-view
- QML Data models real usage (blogpost)
- QtQuick examples (official Qt site) – lot of examples!
- QtQuick mouse-keyboard events handling
- QtQuick signals/events handling (and connections info)
- Extending Qml with Cpp (pieChart example – QQuickPaintedItem, QQmlExtensionPlugin)
- Qml CPP integration
- Qml document scopes
- Qml debugging
QML Canvas
- http://www.ics.com/blog/qml-canvas-element
- http://doc.qt.io/qt-5/qml-qtquick-canvas.html
- https://forum.qt.io/topic/27379/how-to-do-graph-with-qml/2
QML States
QML MouseEvents
- https://www.kdab.com/wp-content/uploads/stories/slides/DD13/qml-tricks-and-treats-vladimir-moolle-ics-dd-2013-berlin.pdf (strana4, use mouse event propagation techinque)
- http://doc.qt.io/qt-5/qml-qtquick-mousearea.html#propagateComposedEvents-prop
QML c++ integration
- http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html
- http://doc.qt.io/qt-4.8/qtbinding.html
- http://doc.qt.io/qt-5/qtqml-cppclasses-topic.html
- http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html
QtQuick painted items
- http://doc.qt.io/qt-5/qtquick-customitems-painteditem-example.html
- http://doc.qt.io/qt-5/qtquick-canvas-example.html
- https://bugreports.qt.io/browse/QTBUG-32741 (discussion QPaint vs QQuickPaintedItem vs QSGGeometry)
- http://doc.qt.io/qt-5/qquickpainteditem.html#setAntialiasing (antialisin for QPaint items)
- http://doc.qt.io/qt-5/qtquick-scenegraph-customgeometry-example.html (QtQuick scene graph QSGGeometry example)
QML charts
- http://blog.sebasgo.net/blog/2012/09/26/line-graphs-for-qt-quick/
- http://jwintz.me/blog/2014/02/15/qchart-dot-js-qml-binding-for-chart-dot-js/
- http://doc.qt.io/qt-5/qtquick-demos-stocqt-example.html
QML Diagrams
- https://github.com/jehrichs/Diaqml
- QtModelling (owner’s blog)
- QtModelling (Qt wiki)
- Qml OGFS(github)
- https://bitbucket.org/tonu/coder/src/5b421538de50?at=master
QML & QtQuick blogposts
- http://blogs.igalia.com/xrcalvar/page/2/
- https://buttleofx.wordpress.com/2013/01/ (notes about implementil lines in diagram in qml)
QML Selection, multiselection, rectangle-selection
- https://forum.qt.io/topic/52249/solved-qml-mouse-selection-rectangle
- http://doc.qt.io/qt-5/qml-qtquick-flickable.html
- https://forum.qt.io/topic/28632/solved-multi-select-of-tableview
- http://stackoverflow.com/questions/25809856/draw-rectangle-using-mouse-qml
QML Tools
QML Applications