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 / 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
<?php
/**
* Get server address, cross platform safe.
*/
array_key_exists('SERVER_ADDR',$_SERVER) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
@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);
@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 / 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;
html,
body {
width: 100%;
height: 100%;
}
/* div */.body {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
@nathan-isaac
nathan-isaac / text.txt
Created October 8, 2013 15:35
SQL Injection
Filter Input
Excape Output
@nathan-isaac
nathan-isaac / web.config
Created October 15, 2013 04:28
Ghost IIS 7.5 Config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="iisnode" />
<div class="page-wrap">
Content!
</div>
<footer class="site-footer">
I'm the Sticky Footer.
</footer>