Skip to content

Instantly share code, notes, and snippets.

View nathan-isaac's full-sized avatar

Nathan Isaac nathan-isaac

View GitHub Profile
@nathan-isaac
nathan-isaac / font-face.scss
Created September 25, 2013 18:27
Font Face
$filePath: '../fonts/jenna/';
@font-face {
font-family: 'jenna_sueregular';
src: url($filePath + 'jennasue-webfont.eot');
src: url($filePath + 'jennasue-webfont.eot?#iefix') format('embedded-opentype'),
url($filePath + 'jennasue-webfont.woff') format('woff'),
url($filePath + 'jennasue-webfont.ttf') format('truetype'),
url($filePath + 'jennasue-webfont.svg#jenna_sueregular') format('svg');
font-weight: normal;
@nathan-isaac
nathan-isaac / Gruntfile.js
Created September 25, 2013 18:14
Adding Grunt to your project.
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
// 2. Configuration for concatinating files goes here.
}
@nathan-isaac
nathan-isaac / env.php
Created September 23, 2013 23:08
PHP error reporting.
<?php
// Report all errors
error_reporting(E_ALL);
// Report only Notice, Deprecated, and Strict erros
error_reporting(E_ALL ^ (E_NOTICE | E_DEPRECATED | E_STRICT));
// Set to true or false
ini_set('display_errors', 0);
<?php
/**
* Get server address, cross platform safe.
*/
array_key_exists('SERVER_ADDR',$_SERVER) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
@nathan-isaac
nathan-isaac / Css Transparency
Created April 14, 2012 06:33
Transparency is something that isn’t done the same way across browsers which can be annoying. Here’s how you can target transparency in multiple browsers.
.transparent {
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
@nathan-isaac
nathan-isaac / Link Styling
Created April 14, 2012 06:32
Style links depending on file format