Skip to content

Instantly share code, notes, and snippets.

@Lammerink
Lammerink / reset.css
Last active October 11, 2015 21:57 — forked from danilowm/gist:1070332
CSS : CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@Lammerink
Lammerink / gist:3925083
Created October 20, 2012 22:43
HTML : Starting template
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
@Lammerink
Lammerink / style.css
Last active October 11, 2015 21:57
CSS : Starting Template
@charset "UTF-8";
/* CSS Document */
@Lammerink
Lammerink / gist:3925106
Created October 20, 2012 22:49
PHP : Image Resize and Crop Using ImageMagick
<?php
// Image Resize and Crop using ImageMagick
// the Function
//imageresize to Thumb
function imageresize($src,$dest,$size=75){
list($w,$h) = getimagesize($src);
if($w > $h){
@Lammerink
Lammerink / gist:3925132
Last active September 2, 2016 11:36
PHP : Generated in X Seconds
<?php
//Generated in X Seconds Helper
//Put this at the top of the script
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
?>
@Lammerink
Lammerink / gist:3925263
Created October 20, 2012 23:42
PHP : Get Biggest image from URL
<?php
// Don't forget to install URL_to_Absolute
// Found at http://www.electrictoolbox.com/examples/url_to_absolute.zip
function get_biggest_img($url){
require_once('simple_html_dom.php'); // PHP Simple HTML DOM Parser.
require_once('url_to_absolute/url_to_absolute.php'); // get image absolute url.
// options
$biggestImage = 'path to "no image found" image'; // Is returned when no images are found.
@Lammerink
Lammerink / HTML : Open Link in New Window.html
Last active October 11, 2015 21:58
HTML : Open Link in New Window
@Lammerink
Lammerink / gist:3925295
Created October 20, 2012 23:59
HTML : Set iPhone Bookmark Icon
Set iPhone Bookmark Icon
Place this in your <head> section, and set the href attribute to an image to a 57px x 57px PNG file.
<link rel="apple-touch-icon" href="iphone-icon.png"/>
To prevent the iPhone from adding it's own gloss:
<link rel="apple-touch-icon-precomposed" href="icon.png" />
@Lammerink
Lammerink / gist:3925301
Created October 21, 2012 00:06
CSS : Basic Link Roll Over CSS Sprite
Basic Link Rollover as CSS Sprite
a {
display: block;
background: url(sprite.png) no-repeat;
height: 30px;
width: 250px;
}
a:hover {
@Lammerink
Lammerink / imagemagick.php
Last active July 3, 2019 10:45
PHP : Verify if ImageMagick is Installed
<?
/*
// This file will run a test on your server to determine the location and versions of ImageMagick.
//It will look in the most commonly found locations. The last two are where most popular hosts (including "Godaddy") install ImageMagick.
//
// Upload this script to your server and run it for a breakdown of where ImageMagick is.
//
*/
echo '<h2>Test for versions and locations of ImageMagick</h2>';
echo '<b>Path: </b> convert<br>';