This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This approach was initally inspired by Bourbons (bourbon.io) approach on packing CSS Selectors together in one | |
* variable so you can easily do stuff with a group of selectors. | |
* Since the SASS 3.4 release you don't need any extra mixins to append classes or pseudo-classes on a selector list. | |
*/ | |
// Our Collection of input types we want to bind together | |
$_inputs-list:'input[type="email"]', | |
'input[type="number"]', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$elementSeparator: '__'; | |
$modifierSeparator: '--'; | |
@function containsModifier($selector) { | |
$selector: selectorToString($selector); | |
@if str-index($selector, $modifierSeparator) { | |
@return true; | |
} @else { | |
@return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_api_encode_acf($data,$post,$context){ | |
$data['meta'] = array_merge($data['meta'],get_fields($post['ID'])); | |
return $data; | |
} | |
if( function_exists('get_fields') ){ | |
add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lazy font-face generator | |
// @TODO: Consider additional mixin parameter to specify which font filetypes to output, e.g. "eot, woff" | |
@mixin font-face($label,$font) { | |
@font-face { | |
font-family: $label; | |
src: url('#{$font_path}#{$font}.eot'); | |
src: url('#{$font_path}#{$font}.eot?#iefix') format('embedded-opentype'), | |
url('#{$font_path}#{$font}.woff') format('woff'), | |
url('#{$font_path}#{$font}.ttf') format('truetype'), | |
url('#{$font_path}#{$font}##{$label}') format('svg'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin css-edit-warning { | |
/*! WARNING: This CSS file was generated from a Sass file. Do NOT edit it. */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To use this in your SASS project, simply load this module into | |
# your environment. | |
module Sass::Script::Functions | |
# Dynamically calls a variable by a string | |
# e.g. var("foo" + "bar") => $foobar | |
def var(name) | |
assert_type name, :String, :name | |
@environment.var(name.value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PID_FILE=/var/run/mailcatcher.pid | |
NAME=mailcatcher | |
PROG="/usr/bin/env mailcatcher" | |
USER=mailcatcher | |
GROUP=mailcatcher | |
start() { | |
echo -n "Starting MailCatcher" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Email Confirmation | |
* Description: Send an email to the user with confirmation code and store form data in database until user confirms. | |
* Author: Cedric Ruiz | |
*/ | |
class EmailConfirmation | |
{ | |
const PREFIX = 'email-confirmation-'; |
This Gist has been moved to https://github.com/lbgists/rain.sh.