Skip to content

Instantly share code, notes, and snippets.

View klickreflex's full-sized avatar

Daniel Wentsch klickreflex

View GitHub Profile
@klickreflex
klickreflex / multi_line_padding.css
Created October 5, 2012 08:15
How to add horizontal padding to every line in one multi-line wrapped sentence
span {
background:#ff0;color:#000;
box-shadow:0.2em 0 0 #ff0,-0.2em 0 0 #ff0;
-moz-box-shadow:0.2em 0 0 #ff0,-0.2em 0 0 #ff0;
-webkit-box-shadow:0.2em 0 0 #ff0,-0.2em 0 0 #ff0;
}
# Database setup. The driver can be either sqlite, mysql or postgres. For
# SQLite, only the databasename is required, while MySQL and PostgreSQL also
# require username, password and perhaps a hostname.
# If you're trying out Bolt, just keep it set to SQLite for now.
database:
driver: sqlite
databasename: bolt
# The name of the website
sitename: A sample site
<?php
namespace Bolt\Controllers\Esperanto;
use Bolt\Application;
use Bolt\Controllers\Frontend as BoltFrontend;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@klickreflex
klickreflex / gist:860ec90553574e4fbb29
Created May 19, 2014 10:15
CSSList Bullet Coloring
li {
list-style: none;
}
li:before {
/* For a round bullet */
content:'\2022';
/* For a square bullet */
/*content:'\25A0';*/
display: block;
module.exports = function(grunt) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// 2. Configuration for concatinating files goes here.
concat: {
dist: {
src: [
'theme/tierpsychologie/bower_components/gumby/js/libs/gumby.js', // All JS in the libs folder
// Your custom SCSS should be written here...
@import "fancytilesoutside";
// apply fancytilesoutside to the element containing your tiles (eg the <ul> tag)
ul.fancy {
@include fancytilesoutside(3,2,1);
}
From 38b6c81fa6cb7cbb1511d6fc54d24d06a52d3fc4 Mon Sep 17 00:00:00 2001
From: Daniel Wentsch <hello@wentsch.me>
Date: Mon, 18 Aug 2014 15:53:23 +0200
Subject: [PATCH] Added missing localization for File Downloads Suite default
values
---
sites/all/modules/contrib/ms_files/ms_files.module | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
From ca58987b48dd563bb5f1743bcfed32da6b014c93 Mon Sep 17 00:00:00 2001
From: Daniel Wentsch <hello@wentsch.me>
Date: Mon, 18 Aug 2014 16:19:59 +0200
Subject: [PATCH] Added missing localization for File Downloads Suite default
values, fixed a typo
---
sites/all/modules/contrib/ms_files/ms_files.module | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@klickreflex
klickreflex / drupal_rule_disable_shipping_for_digital_products
Created September 5, 2014 09:50
Drupal: Disable Shipping pane and shipping address collection if order contains only products of certain type
{ "rules_disable_shipping_digital" : {
"LABEL" : "Disable Shipping for Digital Products",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "commerce_order", "commerce_rules_extra" ],
"ON" : { "process_checkout_pane" : [] },
"IF" : [
{ "NOT commerce_order_contains_product_type" : {
"commerce_order" : [ "commerce_order" ],
"product_type" : { "value" : { "physical_product" : "physical_product" } },
@klickreflex
klickreflex / .htaccess
Last active May 17, 2021 14:10
Setting up and Using Environments with htaccess
# This `.htaccess` snippet does the following:
# 1. Create two environments called staging and development based on the host name
# 2. Set up ht authentication only on the stage server (`Deny from env=staging`)
# 3. Rewrite all requests to the main domain (www.mysite.com) if we’re not on either the development nor staging environment and the host doesn't already equal the main domain
AuthName "Staging Server"
AuthType Basic
AuthUserFile /var/sites/mysite/.htpasswd
AuthGroupFile /dev/null