Skip to content

Instantly share code, notes, and snippets.

@tomrishworth
tomrishworth / Media Query Mixin
Last active August 29, 2015 14:05
Media Query Mixin
// Media Query Variables
$XS: 580px;
$S: 768px;
$M: 992px;
$L: 1200px;
$XL: 1440px;
// Media Query Mixin
@mixin MQ($canvas){
@if $canvas == XS{
@tomrishworth
tomrishworth / gist:af212436005a21e06e2c
Last active August 29, 2015 14:10
Webscope Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
files: ['sass/**/*.{scss,sass}','sass/_partials/**/*.{scss,sass}'],
tasks: ['sass:dist'],
options: {
livereload: true
}
@tomrishworth
tomrishworth / applying-fontawesome-icons-with-css-3
Created November 27, 2014 19:37
Applying FontAwesome icons with css - 3
a{
font-size: 0;
&:before{
font-size: 20px;
}
}
{
"always_show_minimap_viewport": true,
"auto_complete_delay": 0,
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",
"auto_find_in_selection": true,
"binary_file_patterns":
[
".sass-cache/*"
],
"bold_folder_labels": true,
Add new virtual hosts settings to settings.yml
Vagrant up
Vagrant ssh
cd into project folder
clone repo from Pantheon
create settings.local.php(duplicate and rename example.settings.local.php)
edit database settings
change base_url
grab files & database from Pantheon
unzip db and rename to database.sql
body {
&:after {
position: fixed;
bottom: 0;
right: 0;
content: 'xs (- 768px)';
background: #333;
color: #fff;
padding: 3px 6px;
@include MQ(S) {
# Symlink project directory
ln -s ~/projects/fund-manager-api www
# Load Aliases
source scripts/aliases.sh
dstart
dartisan migrate:refresh --seed
docker rmi lmsportal_mysql_1
{
"always_show_minimap_viewport": true,
"auto_complete_delay": 0,
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",
"auto_find_in_selection": true,
"binary_file_patterns":
[
".sass-cache/*"
],
"bold_folder_labels": true,
@tomrishworth
tomrishworth / Sass loop
Created September 7, 2016 04:01
Sass loop
@for $i from 1 through 10 {
$delay-start: 50;
$delay: 50ms;
.navbar-nav > li:nth-child(#{$i}) {
a, .dropdown-toggle {
transition-delay: ($delay * $i + $delay-start) !important;
}
}
}
@tomrishworth
tomrishworth / gist:4e45a6dd75b8c0cdcf57c7af0e67251e
Last active February 13, 2017 20:45
Depoly subfolder to github pages
git subtree push --prefix subfolder-name-here origin gh-pages
git subtree push --prefix build origin gh-pages