Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
peteristhegreat / linux-one-liners.md
Last active September 2, 2023 17:09
Linux notes

Miscellaneous Linux Commands

Introduction

Linux users are expected to interact with the Linux systems quickly and efficiently.

A bare minimum number of commands will get you by, but if you are interested in sharing what works for you, or common/favorite one-liners or pieces of your bash script continue reading.

General Links

@peteristhegreat
peteristhegreat / qt_videos.md
Created September 15, 2017 20:59
Qt Video links

http://doc.qt.io/qt-4.8/how-to-learn-qt.html#listen-to-qt-experts-on-videos

Getting Started with Qt https://www.youtube.com/playlist?list=PLizsthdRd0Yy7K3dkSGD__y-4njvY_DLj Qt Training by Qt Consultants (ICS, KDAB, etc) Videos... https://www.youtube.com/user/QtStudios/search?query=%22Qt+Training%22 Qt Fundamentals by Qt Consultants - https://www.youtube.com/user/QtStudios/search?query=qt+fundamentals ProgrammingKnowledge Youtuber Playlist of 15 minute videos on 30+ Qt topics. (indian accent) https://www.youtube.com/playlist?list=PLS1QulWo1RIZiBcTr5urECberTITj7gjA VoidRealms Youtuber Playlist of <10 minute videos on 160+ Qt topics. (american accent) https://www.youtube.com/playlist?list=PL2D1942A4688E9D63

@peteristhegreat
peteristhegreat / dpi_notes_and_links.md
Created October 18, 2017 16:49
DPI rant, Qt, QML, FontSize, QStyleSheets
@peteristhegreat
peteristhegreat / make_qch_files_qt_solutions.bash
Created October 31, 2017 18:06
Qt Solutions, how to make and install the qhc qdoc qhp index.html files into assistant and qtcreator
# How to compile all the libraries and documentation:
for i in */; do
echo "================= $i ================";
(cd $i;
./configure -library;
qmake;
make;);
done
mkdir doc
@peteristhegreat
peteristhegreat / steps_to_fix_errors.md
Last active November 1, 2017 15:59
Last resort fixes for Qt Creator errors and qmake errors

How to appease the Compiler and Moc Compiler gods

Once in a while a phantom error comes up that shouldn't be there, especially in a library that has been working, and you are left scratching your head. Here is a list of some last resort things to try.

Move the include file up and down

Check the end of the file before the previous include file where the error is (might be missing a semicolon at the end of the class)

Build clean

@peteristhegreat
peteristhegreat / mytime.h
Last active November 9, 2017 20:24
QTime subclass that has human readable output that shows hours, minutes, seconds, and has a start/stop/pause button that works as expected.
#ifndef MYTIME_H
#define MYTIME_H
#include <QTime>
#include <QString>
class MyTime : public QTime
{
public:
@peteristhegreat
peteristhegreat / gist:550a6af65f20ec01229340ada456109e
Created December 15, 2017 16:16
Dark github, Dark stackoverflow
https://github.com/isaacs/github/issues/346
https://github.com/Mottie/GitHub-userscripts/wiki/GitHub-toggle-wiki-sidebar
https://github.com/StylishThemes/GitHub-Dark-Script/wiki/Install
https://userstyles.org/styles/35345/stackoverflow-dark
Add in the line in the header:
// @include https://stackoverflow.com/*
https://github.com/sdmg15/Best-websites-a-programmer-should-visit#coding-practice-for-beginners
@peteristhegreat
peteristhegreat / Hover Artifacts Plotly Chrome
Last active October 28, 2022 01:12
Hover Artifacts Plotly Chrome
https://community.plot.ly/t/artifacts-in-hover-over-embedded-plot/7153
https://plot.ly/create/?fid=plotly2_demo:153
https://greensock.com/forums/topic/6533-how-to-fix-rendering-artifacts-in-chrome/
-webkit-backface-visibility:hidden;
http://jsfiddle.net/geekambassador/F2J3s/
@peteristhegreat
peteristhegreat / test_simple.js
Last active January 11, 2018 22:30
NodeJs JQuery Jest, run tests on browser side javascript functions without modules, requirejs or commonjs
// npm install jquery
var $ = require('jquery')
// read in your script from the filesystem
const fs = require('fs');
var text = fs.readFileSync('static/js/sum.js');
// Note, this is a dirty hack to not have to add modules and start using browserify or rollup or webpack or ES6.
$.globalEval(text);
@peteristhegreat
peteristhegreat / views.js
Created January 24, 2018 17:54
CssSelectorGenerator (css-selector-generator.js) with JQuery to save/load all textfields and all checkboxes to Cookies (js.cookie.js)
Views = {};
Views.save = function(){
var CssPath = new CssSelectorGenerator;
var text_fields = {};
var checkboxes = {};
$(":checkbox").each(function(index, element){
var checked = element.checked;