Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Davies opdavies

View GitHub Profile
View each-loops.scss
@each $family in futura-book, futura-bold, futura-bold-italic, futura-italic {
@font-face {
font-family: #{$family};
src: url('../fonts/#{$family}/#{$family}.eot');
src: url('../fonts/#{$family}/#{$family}.eot?#iefix') format('embedded-opentype'),
url('../fonts/#{$family}/#{$family}.woff') format('woff'),
url('../fonts/#{$family}/#{$family}.ttf') format('truetype'),
url('../fonts/#{$family}/#{$family}.svg##{$family}') format('svg');
font-weight: normal;
font-style: normal;
@opdavies
opdavies / config.rb
Last active Aug 29, 2015
A base config.rb file, including sass-globbing, susy and breakpoint.
View config.rb
require "sass-globbing"
require "susy"
require "breakpoint"
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"
fonts_dir = "fonts"
View slick-centermode.js
jQuery(document).ready(function ($) {
"use strict";
if ($('#block-views-hero-slideshow-block').length > 0) {
$('#block-views-hero-slideshow-block .view-content ul').slick({
centerMode: true,
slide: 'li',
slidesToShow: 1
});
}
View _mixins.scss
@mixin styled-select($width: 200px, $margin: 30px) {
overflow: hidden;
width: $width;
select {
@include appearance(none);
@include border-radius(0);
background: none;
border: none;
cursor: pointer;
@opdavies
opdavies / settings.common.php
Created Nov 26, 2014
A common settings file to include on all Drupal sites.
View settings.common.php
<?php
// Disable self-updates.
$conf['allow_authorize_operations'] = FALSE;
// Disable poormanscron.
$conf['cron_safe_threshold'] = 0;
@opdavies
opdavies / settings.local.php
Last active Aug 29, 2015
A base local settings file for Drupal sites.
View settings.local.php
<?php
$databases = array();
$base_url = '';
$conf['site_name'] = '';
// Display all messages.
// $conf['error_level'] = 2;
View sculpin-deploy.sh
#!/bin/sh
SOURCE=~/path/to/source
TARGET=~/path/to/target
ENV=prod
REMOTE_NAME=origin
REMOTE_BRANCH=master
echo "Ensure that the target repository is up to date."
cd ${TARGET}
View sculpin-deploy2.sh
#!/bin/bash
TARGET_REMOTE="origin"
TARGET_BRANCH="master"
DEPLOY_DIR="_deploy"
# Store the last commit message.
LOG=$(git log --oneline -1)
# Re-generate the site
View gist:7e64c50eee9aa21f0e02
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
View slackcheese.txt
#53B0EB,#0678BE,#96BC44,#FFFFFF,#E6FCB6,#FFFFFF,#96BC44,#F15340