Skip to content

Instantly share code, notes, and snippets.

@mistic100
mistic100 / simpletextimage.class.php
Created March 8, 2014 15:25
[PHP] Generate a very simple image containing some text
<?php
/**
* Generate a very simple image containing some text
*
* Basic usage:
* (new SimpleTextImage('Hello world!'))->render();
*
* All functionalities:
* (new SimpleTextImage())
* ->setText('Hello world!')
@mistic100
mistic100 / silkscreen.class.php
Last active August 29, 2015 13:57
[PHP] Write text on image with silkscreen font
<?php
/**
* Write text on image with silkscreen font http://kottke.org/plus/type/silkscreen
*
* Usage:
* $img = imagecreatetruecolor(65, 15);
* $bg = imagecolorallocate($img, 0, 0, 0);
* $fg = imagecolorallocate($img, 255, 255, 255);
*
* silk::write($img, 5, 5, 'Hello world', $fg, 1, false, 0);
@mistic100
mistic100 / delete-installer.iss
Created August 9, 2014 10:12
[InnoSetup] Delete installer on next startup
[Code]
// mark installer for deletion if argument "-delete-installer" is present
procedure DeinitializeSetup();
var i: integer;
begin
for i:= 0 to ParamCount do
begin
if ParamStr(i) = '-delete-installer' then
begin
RestartReplace(ExpandConstant('{srcexe}'), '');
@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
@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 / 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 / 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 / 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 / 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 / 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