Skip to content

Instantly share code, notes, and snippets.

@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 March 10, 2025 15:24
[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
@mistic100
mistic100 / qboutongroupext.hpp
Created January 10, 2016 12:16
[Qt/C++] QButtonGroup which allow to set the checked radio button by its id
#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 December 26, 2015 20:57
[Qt/C++] A QLineEdit used as a color picker
#ifndef QLINEEDITCOLOR
#define QLINEEDITCOLOR
#include <QtWidgets/QLineEdit>
#include <QColorDialog>
#include <QEvent>
/**
* @brief A QLineEdit combined with a QColorDialog
* @signal colorChanged(QColor)
@mistic100
mistic100 / Mediakeys.ahk
Last active March 16, 2025 14:45
Media keys shortcuts for AutoHotkey
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!NumpadMult::Send {Volume_Mute}
^!NumpadAdd::Send {Volume_Up}
^!NumpadSub::Send {Volume_Down}
@mistic100
mistic100 / Squareicon.php
Last active August 29, 2015 14:18
PHP image hash generator
<?php
/**
* Squaricon
*
* @description: PHP image hash generator
*
* @author: Damien "Mistic" Sorel - http://strangeplanet.fr
* @license: MIT
* @version: 2.0.0
* @date: 21/05/2015
@mistic100
mistic100 / IdenticonPlus.php
Last active February 18, 2019 07:33
PHP implementation of Don Park Identicon algorithm with additional shapes and variations
<?php
/**
* Identicon++
*
* @description: PHP implementation of Don Park Identicon algorithm with additional shapes and variations.
*
* @author: Damien "Mistic" Sorel - http://strangeplanet.fr
* @license: MIT
* @version: 2.0.0
* @date: 21/05/2015
@mistic100
mistic100 / jQuery.amusesMoi.js
Created April 8, 2015 18:24
Computes distance and angle between the cursor and a DOM element.
/**
* jQuery amusesMoi! 1.0
*
* Copyright 2012-2013, Damien "Mistic" Sorel
* http://www.strangeplanet.fr
*
* License:
* MIT and GPL dual licensing
*
* Depends:
@mistic100
mistic100 / jQuery.textareaLinesNumbers.css
Created April 8, 2015 18:20
Adds line numbers to <textarea>
.textareaLinesNumbers {
position: relative;
}
.textareaLinesNumbers textarea.linesContainer {
display:block;
border:none;
position:absolute;
overflow:hidden;
text-align:right;
@mistic100
mistic100 / jQuery.imageExplode.js
Created April 8, 2015 18:18
Creates a tile explosion effect over an image when the mouse cursor hovers it. It is also compatible with multi-touch screens.
/*!
* jQuery imageExplode 1.0
*
* Copyright 2013, Damien "Mistic" Sorel
* http://www.strangeplanet.fr
*
* thanks to Ryan Florence for the main algorythm
* http://ryanflorence.com/cssanimation
*
* Dual licensed under the MIT or GPL Version 3 licenses.