Skip to content

Instantly share code, notes, and snippets.

View stikoo's full-sized avatar
🏠
Working from home

Alastair Hodgson stikoo

🏠
Working from home
View GitHub Profile
@stikoo
stikoo / blog.php
Created January 2, 2013 00:03
Modified PyroCMS Blog Plugin to allow outputting of tags/keywords
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Blog Plugin
*
* Create lists of posts
*
* @author PyroCMS Dev Team
* @package PyroCMS\Core\Modules\Blog\Plugins
*/
class Plugin_Blog extends Plugin
@stikoo
stikoo / mixin-rem.scss
Last active December 27, 2015 11:49
A sass mix in to create pixel fallback for rem sizing. Slightly modified version of "http://hugogiraudel.com/2013/03/18/ultimate-rem-mixin/" #sublime #sass
// Use like:
//
// h2 {
// @include rem(font-size, 18px);
// }
//
// or
//
// .box {
// @include rem(margin, 10px 5px 15px 5px);
@stikoo
stikoo / Gruntfile.js
Last active August 29, 2015 13:56
My Gruntfile.js
module.exports = function(grunt) {
// store a var to the process cwd (current working directory)
var cwd = process.cwd();
// use the time plugin for build completion time
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// sprite mixin that can be used to include a sprite into media queries
// @include get-sprite($map, $sprite, $height, $width, $offset-x, $offset-y, $repeat);
// $map is the name of the sprite map, this is auto-generated as a global
// sass var when you do a (for instance) @import "sprites-x2/*.png"
// ----------
// Example: @include get-sprite($sprites-x2-sprites, logo, false, false);
//
@mixin get-sprite($map, $sprite, $height: true, $width: true, $offset-x: 0, $offset-y: 0, $repeat: no-repeat) {
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
// the $svg-sprite var is generated by the gulp-svg-sprites module
// and is a sass map containing all the svg sprite info.
$sprite: map-get($svg-sprite, sprite) !default;
$sprite-padding: map-get($sprite, padding);
$pngSpriteClass: '.no-svg';
// function for merging sass maps
@function extend($map, $ext-map) {
@return map-merge($map, $ext-map);
}
@stikoo
stikoo / app.js
Created September 28, 2016 14:53 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@stikoo
stikoo / _html_entities.scss
Created December 20, 2017 15:56 — forked from apisandipas/_html_entities.scss
HTML Entities map - The pseudo-element 'content' property doesnt accept normal (&raquo;) style HTML entities. These variables below easy the pain of looking up the HEX codes...
/**
* The pseudo-element 'content' property doesnt accept normal (&raquo;) style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation