Skip to content

Instantly share code, notes, and snippets.

@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 February 10, 2024 10:26
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.
@mistic100
mistic100 / TreeBuilder.php
Last active August 20, 2019 14:51
[PHP] Recursive builder pattern
<?php
/**
* Recursive builder pattern
*
* Usage:
* $tree = \Tree\Builder::init()
* ->setName('parent')
* ->addChild()
@mistic100
mistic100 / qcomboboxext.hpp
Last active December 26, 2015 20:58
[Qt/C++] QComboBox With direct access to item data
#ifndef QCOMBOBOXEXT_H
#define QCOMBOBOXEXT_H
#include <QWidget>
#include <QComboBox>
/**
* @brief QComboBox With direct access to item data
* @signal currentDataChanged(QVariant)