Skip to content

Instantly share code, notes, and snippets.

@mistic100
mistic100 / movies-db.php
Created February 7, 2015 09:33
[PHP] A one-file videos files indexer connected to TheMovieDatabase (Windows only)
<?php
/**
* My Movie Database - A Windows Movie Indexer
*
* @author: Damien "Mistic" Sorel - http://strangeplanet.fr
* @license: GNU General Public License
* @since: 25/05/2013
*
* @version: 1.1.0
* @date: 25/07/2013
@mistic100
mistic100 / qwidgetblinker.hpp
Created January 3, 2015 12:37
[Qt/C++] Utility allowing to make any QWidget blink
#ifndef QWIDGETBLINKER_H
#define QWIDGETBLINKER_H
#include <QWidget>
#include <QTimeLine>
#include <QEvent>
/**
* @brief Utility allowing to make any QWidget blink
@mistic100
mistic100 / qtoolbarext.hpp
Last active July 16, 2022 05:28
[Qt/C++] Custom QToolBar allowing to add a button/menu with text and icon
#ifndef QTOOLBAREXT_H
#define QTOOLBAREXT_H
#include <QToolBar>
#include <QMenu>
#include <QToolButton>
/**
* @brief Custom QToolBar allowing to add a button/menu with text and icon
@mistic100
mistic100 / imageroundedrectangle.php
Last active October 27, 2021 08:47
[PHP] Draw a rectangle with rounded corners
<?php
/**
* Draw a rectangle with rounded corners.
* @param ressource &$img An image resource
* @param int $x1 Upper left x coordinate
* @param int $y1 Upper left y coordinate
* @param int $x2 Bottom right x coordinate
* @param int $y2 Bottom right y coordinate
* @param int $r Corners radius
* @param int $color A color identifier created with imagecolorallocate()
@mistic100
mistic100 / Batch SVN to Git.md
Last active August 29, 2015 14:09
[Node] Batch conversion of SVN directories to Git repositories

Requirements

  • node
  • npm
  • svn
  • git
  • git-svn

Usage

  1. npm install
  2. Create empty repositories on Github
@mistic100
mistic100 / players.ini
Created November 2, 2014 13:07
Logitech multimedia keys support for AIMP (file is in C:\Program Files\Logitech\SetPointP)
[Players]
AIMP3=cmd,AIMP3.exe,Winamp v1.x,xxx,xxx,40045,40046,40047,40044,40048,0,1,WinAmp 5
AIMP2=cmd,AIMP2.exe,Winamp v1.x,xxx,xxx,40045,40046,40047,40044,40048,0,1,WinAmp 5
@mistic100
mistic100 / one-instance.cpp
Last active July 1, 2023 22:08
[C] Use Windows mutex to create a single instance app
#include <windows.h>
int main(int argc, char *argv[])
{
// ensure only one running instance
HANDLE hMutexHandle = CreateMutex(NULL, TRUE, L"my.mutex.name");
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
return 0;
}
@mistic100
mistic100 / custom-link.iss
Created August 9, 2014 10:24
[InnoSetup] Custom link in installer footer
@mistic100
mistic100 / check-version.iss
Last active January 3, 2024 22:22
[InnoSetup] Prevent install if newer version is already installed
#define AppId "{INSERT HERE YOUR GUID}"
#define AppName "My App"
#define AppVersion "1.7"
[CustomMessages]
english.NewerVersionExists=A newer version of {#AppName} is already installed.%n%nInstaller version: {#AppVersion}%nCurrent version:
[Code]
// find current version before installation
function InitializeSetup: Boolean;
var Version: String;
@mistic100
mistic100 / delete-config.iss
Last active August 29, 2015 14:05
[InnoSetup] Ask for delete config file on uninstall
#define SettingsFile "settings.xml"
[CustomMessages]
english.DeleteSettings=Delete settings file?
[Code]
// ask for delete config file during uninstall
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
case CurUninstallStep of