Skip to content

Instantly share code, notes, and snippets.

; Starts qBitorrent after prompting for the listening port
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
$iniFile = "C:\Users\USER\AppData\Roaming\qBittorrent\qBittorrent.ini"
$exeFile = "C:\Program Files\qBittorrent\qbittorrent.exe"
  1. generate palette
ffmpeg -y -i video.webm -vf palettegen=max_colors=64 palette.png
  1. convert
ffmpeg -y -i video.webm -i palette.png -filter_complex paletteuse=dither=bayer:bayer_scale=1 -r 15 output.gif
ffmpeg -i video.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr -qscale:v 2 still-%02d.jpg
@mistic100
mistic100 / vimeo-downloader.js
Created September 15, 2018 09:01
Download video from Vimeo (chopped m4s files)
// 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 09:17
Gallery generator for Phugo
______________________________
/ __________________________ /|
/ / ________________________/ / |
/ / /| | / / |
/ / / | | / / . |
/ / /| | | / / /| |
/ / / | | | / / / | |
/ / / | | | / / /| | |
/ /_/___| | |_______________/ / / | | |
/________| | |________________/ / | | |

Read

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

Write

$ exiftool -tagsfromfile data.xmp -all:all file.jpg
@mistic100
mistic100 / qchecklist.h
Created January 23, 2017 19:13
[Qt/C++] QComboBox with support of checkboxes
#ifndef QCHECKLIST
#define QCHECKLIST
#include <QWidget>
#include <QComboBox>
#include <QStandardItemModel>
#include <QLineEdit>
#include <QEvent>
#include <QStyledItemDelegate>
#include <QListView>
@mistic100
mistic100 / qtabwidgetext.h
Created September 4, 2016 16:08
[Qt/C++] QTabWidget which allow to set the current tab by its name
#ifndef QTABWIDGETEXT
#define QTABWIDGETEXT
#include <QTabWidget>
/**
* @brief QTabWidget which allow to set the current tab by its name
*/
class QTabWidgetExt : public QTabWidget
{
@mistic100
mistic100 / vcredist.iss
Last active April 27, 2022 05:17
[InnoSetup] Include VC++ Redistribuable (http://stackoverflow.com/a/11172939/1207670)
; 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