This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// load images | |
$image = new Imagick("main_image.jpg"); | |
$watermark = new Imagick("stamp.png"); | |
// main image dimension | |
$geo=$image->getImageGeometry(); | |
$x=$geo['width']; | |
$y=$geo['height']; | |
// stamp image dimension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush php-eval "module_load_install('MYMODULE'); MYMODULE_update_NUMBER();" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/snap.svg/0.1.0/snap.svg-min.js"></script> | |
<script> | |
var s = Snap("#svg"); | |
var block = s.rect(50, 50, 100, 100, 20, 20); | |
block.attr({ | |
fill: "rgb(236, 240, 241)", | |
stroke: "#1f2c39", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.jsdelivr.net/snap.svg/0.1.0/snap.svg-min.js"></script> | |
<script> | |
var s = Snap("#svg"); | |
var gridSize = 50; | |
var orig = { | |
x: 0, | |
y: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 Line Tetris --> http://jsfiddle.net/ova777/kFxja/ | |
30 Line Sokoban --> http://jsfiddle.net/zabbius/nU74f/ | |
34 Line Minesweeper --> http://jsfiddle.net/c884a/ | |
30 Line Arcanoid --> http://jsfiddle.net/martin_/Fq8F4/ | |
30 Line Snake --> http://jsfiddle.net/Uk2PP/9/ | |
30 Line Excel --> http://jsfiddle.net/zag2art/b3pbw/4/ | |
30 Line Race --> http://jsfiddle.net/Minimajack/C545E/embedded/result/ | |
37 Line PONG --> http://jsfiddle.net/WNrfp/6/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toMatrix(transform) { | |
var transforms = transform.split(' '), | |
matrix = Raphael.matrix(); | |
for (var i=0; i<transforms.length; i++) { | |
var match = /^(\w+)\((.+)\)$/.exec(transforms[i]), | |
tranform = match[1], | |
values = toFloatArray(match[2]); | |
if ('translate' === transform) matrix.translate.apply(matrix, values); |
NewerOlder