Skip to content

Instantly share code, notes, and snippets.

View davidhellmann's full-sized avatar
🤔
Focusing

David Hellmann davidhellmann

🤔
Focusing
View GitHub Profile
@gisu
gisu / mixins-example.scss
Created February 22, 2014 00:26
Put your own mixins in
@mixin size($size) {
@if length($size) == 2 {
$width : nth($size,1);
$height : nth($size,2);
@if unitless($width) {
$width: $width + 0px;
}
@if unitless($height) {
@gisu
gisu / SassMeister-input.scss
Created February 24, 2014 15:40
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
$media-direction: max;
// Mixin: flex-breakpoint
// Flexible Breakpoint Mixin
// 'Mixin with Content Insert'
//
/**
* Smart Append Selectors
*
* @param {string} $name - Name of the Tag
* @param {string|bool} $mod - Name of the modifier
* @param {bool} $context - For nested selector
* @param {string} $name - Name from the Tag
*/
@mixin append($tag, $mod: false, $context: false) {
@gisu
gisu / Multienvironment Worpdress.txt
Last active December 20, 2015 12:00
Multienvironment Worpdress
Include a directory in your Theme folder with the name `wp-config` and include here the File for your Environment.
// When we give an element some ‘attention’.
@mixin attention() {
&:hover,
&:active,
&:focus {
@content;
}
}
@rtorr
rtorr / gist:2493270
Created April 25, 2012 20:54
Temporary fix for using symlinks with google drive (gdrive) on mac
Because gdrive will not actually sync symlinks from your computer to gdrive, you should temporarily do the opposite.
For example, I wanted to have a symlink from my ~/Sites directory to automatically sync with gdrive, so i did the simple command:
ln -s ~/Sites/drive ~/Google\ Drive/mSites/
That will not sync at the moment.
So instead I made a directory in gdrive and did a symlink back in my ~/Sites directory
@martinherweg
martinherweg / downloadCraftPlugins.js
Last active July 24, 2017 12:20
Allows you to install new Craft
/**
* Download Craft Plugins
*
* @package generator-mh-boilerplate
* @author Martin Herweg <info@martinherweg.de>
*/
const inquirer = require('inquirer');
const download = require('download');
const ProgressBar = require('progress');
@MichaelMackus
MichaelMackus / IncludeRawExtension.php
Created July 22, 2015 00:34
Include raw twig template
<?php
class IncludeRawExtension extends \Twig_Extension
{
public function getFunctions()
{
return [
new \Twig_SimpleFunction(
'includeRaw',
[$this, 'includeRaw'],
@martinherweg
martinherweg / DepartmentFile.json
Last active November 13, 2017 13:12
Create new Sections based on a Base JSON
{
"sections": [
{
"name": "A New Section",
"handle": "a_new_section_handle"
}
]
}
@Chrisedmo
Chrisedmo / Craft3ValetDriver.php
Created February 1, 2017 10:29
Craft 3 Composer Install Valet Driver
<?php
class Craft3ValetDriver extends ValetDriver
/* https://github.com/laravel/valet/blob/master/cli/drivers/CraftValetDriver.php */
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName