Skip to content

Instantly share code, notes, and snippets.

Avatar

Damien Sorel mistic100

View GitHub Profile
View ffmpeg-extract-keyframes.md
ffmpeg -i video.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr -qscale:v 2 still-%02d.jpg
@mistic100
mistic100 / vimeo-downloader.js
Created Sep 15, 2018
Download video from Vimeo (chopped m4s files)
View vimeo-downloader.js
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
@mistic100
mistic100 / 1.phugo-gallery-generator.md
Last active May 1, 2021
Gallery generator for Phugo
View 1.phugo-gallery-generator.md
View penrose-cube.ascii.txt
______________________________
/ __________________________ /|
/ / ________________________/ / |
/ / /| | / / |
/ / / | | / / . |
/ / /| | | / / /| |
/ / / | | | / / / | |
/ / / | | | / / /| | |
/ /_/___| | |_______________/ / / | | |
/________| | |________________/ / | | |
View readwrite-xmp.md

Read

$ exiftool -xmp -b file.jpg > data.xmp

Write

$ exiftool -tagsfromfile data.xmp -all:all file.jpg
@mistic100
mistic100 / qchecklist.h
Created Jan 23, 2017
[Qt/C++] QComboBox with support of checkboxes
View qchecklist.h
#ifndef QCHECKLIST
#define QCHECKLIST
#include <QWidget>
#include <QComboBox>
#include <QStandardItemModel>
#include <QLineEdit>
#include <QEvent>
#include <QStyledItemDelegate>
#include <QListView>
@mistic100
mistic100 / qtabwidgetext.h
Created Sep 4, 2016
[Qt/C++] QTabWidget which allow to set the current tab by its name
View qtabwidgetext.h
#ifndef QTABWIDGETEXT
#define QTABWIDGETEXT
#include <QTabWidget>
/**
* @brief QTabWidget which allow to set the current tab by its name
*/
class QTabWidgetExt : public QTabWidget
{
View vcredist.iss
; The VCRedistNeedsInstall function checks if a given version of VC++ is already installed
; Modify the function with one (or more) of the VC_* constants to suit your version
[Run]
Filename: "{app}\redist\vcredist_x86.exe"; Parameters: "/q /norestart /q:a /c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """; Check: VCRedistNeedsInstall; WorkingDir: {app}\redist; StatusMsg: Installing VC++ 2013 Redistributables...
[Code]
#IFDEF UNICODE
#DEFINE AW "W"
#ELSE
@mistic100
mistic100 / qboutongroupext.hpp
Created Jan 10, 2016
[Qt/C++] QButtonGroup which allow to set the checked radio button by its id
View qboutongroupext.hpp
#ifndef QBUTTONGROUPEXT
#define QBUTTONGROUPEXT
#include <QButtonGroup>
#include <QAbstractButton>
/**
* @brief QButtonGroup which allow to set the checked radio button by its id
*/
class QButtonGroupExt : public QButtonGroup
@mistic100
mistic100 / qlineeditcolor.hpp
Created Dec 26, 2015
[Qt/C++] A QLineEdit used as a color picker
View qlineeditcolor.hpp
#ifndef QLINEEDITCOLOR
#define QLINEEDITCOLOR
#include <QtWidgets/QLineEdit>
#include <QColorDialog>
#include <QEvent>
/**
* @brief A QLineEdit combined with a QColorDialog
* @signal colorChanged(QColor)