Skip to content

Instantly share code, notes, and snippets.

@anlek
anlek / application.scss
Last active April 30, 2020 13:51
My current work around for simple_form and Bootstrap 4 beta to work together (till simple_form allows input fields to have `is-invalid` set on it on error - see https://github.com/plataformatec/simple_form/pull/1476)
// Fix for validations on simple form
// Need to import bootstrap functions and mixins if you want to dynamically set colors
// Otherwise replace theme-color... with hex color
@import 'bootstrap/functions';
@import 'bootstrap/variables';
@import 'bootstrap/mixins';
.has-invalid {
.invalid-feedback {
@ipedrazas
ipedrazas / gist:67488f0c93efd41d5130
Created January 21, 2016 16:24
docker-machine-on-aws
# This script sets up a docker machine on AWS with a static IP and DNS entry.
# To run this script, you need:-
# on AWS:-
# - a VPC with a public subnet
# - a hosted zone set up that you can add a resource record to.
# - a user with EC2 and Route53 permissions
# on your machine:-
# - docker-machine: https://www.docker.com/docker-toolbox
@brianoz
brianoz / class-virtualthemedpage-bc.php
Created February 20, 2014 01:10
WordPress Virtual page with theme
<?php
/*
* Virtual Themed Page class
*
* This class implements virtual pages for a plugin.
*
* It is designed to be included then called for each part of the plugin
* that wants virtual pages.
*
* It supports multiple virtual pages and content generation functions.