Skip to content

Instantly share code, notes, and snippets.

@mistic100
mistic100 / silkscreen.class.php
Last active Aug 29, 2015
[PHP] Write text on image with silkscreen font
View silkscreen.class.php
<?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 / simpletextimage.class.php
Created Mar 8, 2014
[PHP] Generate a very simple image containing some text
View simpletextimage.class.php
<?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 / delete-installer.iss
Created Aug 9, 2014
[InnoSetup] Delete installer on next startup
View delete-installer.iss
[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 Aug 29, 2015
[InnoSetup] Ask for delete config file on uninstall
View delete-config.iss
#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 Aug 29, 2015
[Node] Batch conversion of SVN directories to Git repositories
View Batch SVN to Git.md

Requirements

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

Usage

  1. npm install
  2. Create empty repositories on Github
@mistic100
mistic100 / qwidgetblinker.hpp
Created Jan 3, 2015
[Qt/C++] Utility allowing to make any QWidget blink
View qwidgetblinker.hpp
#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 Feb 7, 2015
[PHP] A one-file videos files indexer connected to TheMovieDatabase (Windows only)
View movies-db.php
<?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 Apr 8, 2015
Creates a tile explosion effect over an image when the mouse cursor hovers it. It is also compatible with multi-touch screens.
View jQuery.imageExplode.js
/*!
* 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 / Squareicon.php
Last active Aug 29, 2015
PHP image hash generator
View Squareicon.php
<?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 / jQuery.amusesMoi.js
Created Apr 8, 2015
Computes distance and angle between the cursor and a DOM element.
View jQuery.amusesMoi.js
/**
* jQuery amusesMoi! 1.0
*
* Copyright 2012-2013, Damien "Mistic" Sorel
* http://www.strangeplanet.fr
*
* License:
* MIT and GPL dual licensing
*
* Depends: