Skip to content

Instantly share code, notes, and snippets.

@inkbase
inkbase / index.html
Created February 19, 2016 00:30
HTML: Default template
<!DOCTYPE html>
<html lang="en">
<head>
<title>Default HTML File</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="stylesheets/screen.css">
</head>
<body>
@inkbase
inkbase / clearfix.scss
Created March 13, 2015 19:21
Sass: Clearfix mixin
@mixin clearfix() {
&:before,
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
}
@inkbase
inkbase / base.scss
Created March 18, 2014 01:37
CSS: Base CSS file
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box
}
body {
background-color: #fff;
@inkbase
inkbase / index.jade
Last active August 29, 2015 13:57
Jade: Base Jade file
doctype
html(lang="en")
head
title Default Jade File
meta(charset="utf-8")
meta(name="viewport",content-width="width=device-width")
//link(rel="stylesheet", href="style/style.css")
body
h1 Hello World!!!!!
@inkbase
inkbase / ProjectName.sublime-project
Created March 17, 2014 21:46
Base Sublime Text project
{
"folders":
[
{
"follow_symlinks": true,
"path": ".",
"folder_exclude_patterns":
[
"node_modules",
".sass-cache"
@inkbase
inkbase / package.json
Created March 17, 2014 21:33
Base package.json
{
"name": "ProjectName",
"description": "Just testing out my workflow.",
"version": "0.1.0",
"author": "Jason Landry",
"private": true,
"devDependencies": {
"grunt": "~0.4.x",
"grunt-contrib-sass": "~0.7.x",
"grunt-contrib-watch": "~0.6.x",
@inkbase
inkbase / Gruntfile.js
Last active August 5, 2017 11:59
A Gruntfile to set up a Sass/Jade project
module.exports = function(grunt) {
// configure the tasks
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// copy from the source directory to build
copy: {
build: {
@inkbase
inkbase / base.js
Last active August 29, 2015 13:57
JavaScript: Base module pattern
//Include jQuery if needed. Including it here will reduce HTTP requests
var base = {
init: function () {
//Do stuff
}
};
@inkbase
inkbase / adoptOrphans.js
Last active October 2, 2015 20:58
jQuery: Adopt orphans plugin
// Plugin for removing orphans from pieces of text.
// Inspired by http://www.learningjquery.com/2008/07/three-quick-ways-to-avoid-widows
// Author: Jason Landry
// Web: http://inkbase.com
(function( $ ){
$.fn.adoptOrphans = function() {
this.each(function() {
var result = '';
var array = $(this).html().split(' ');
var lWord = array.pop();
@inkbase
inkbase / imageReplacement.css
Last active October 2, 2015 18:28
CSS: Image replacement
.ir {
font: 0/0 a;
color: transparent;
background-color: transparent;
}