Skip to content

Instantly share code, notes, and snippets.

@Lammerink
Lammerink / phpinfo.php
Created February 7, 2015 12:06
PHP : Get PHPinfo
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
@Lammerink
Lammerink / CSS : Turn Images Black and White.css
Last active December 16, 2015 17:50
CSS : Turn Images Black and White
@charset "UTF-8";
/* CSS: Turn Images Black and White */
/* for more info go to: http://demosthenes.info/blog/532/Convert-Images-To-Black-And-White-With-CSS */
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
@Lammerink
Lammerink / CSS : Web Font Stacks.css
Last active April 5, 2018 13:10
CSS : Web Font Stacks
@charset "UTF-8";
/* Web Font stacks */
/* The Times New Roman-based serif stack: */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif stack:*/
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/*A more traditional Garamond-based serif stack:*/
@Lammerink
Lammerink / index.html
Last active August 29, 2016 17:07
HTML5 : New Document Template
<!DOCTYPE HTML>
<html>
<head>
<meta charset = "utf-8">
<title> </title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<!--[if IE]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script scr ="script/script.js"></script>
@Lammerink
Lammerink / error.php
Last active October 11, 2015 22:28
PHP : Return Error Codes
</php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
?>
@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>';
@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 / 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 / HTML : Open Link in New Window.html
Last active October 11, 2015 21:58
HTML : Open Link in New Window
@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.