Skip to content

Instantly share code, notes, and snippets.

View bradjones1's full-sized avatar
🤓

Brad Jones bradjones1

🤓
View GitHub Profile
@bradjones1
bradjones1 / config.rb
Last active October 5, 2016 16:02
Compass inline svg with string replacement (e.g., for fills)
module Sass::Script::Functions
def inline_svg_image(path, repl = nil)
real_path = File.join(Compass.configuration.images_path, path.value)
svg = data(real_path)
if repl && repl.respond_to?('to_h')
repl = repl.to_h
svg = svg.to_s
repl.each_pair do |k, v|
@bradjones1
bradjones1 / gist:f8c16d640ca8d1f2d559
Last active January 30, 2016 00:21
Log simplesamlphp error info to syslog, for cross-reference to trackID
<?php
/**
* Class error_show
*
* A custom error show method to log some useful additional information.
*/
class error_show {
public static function show($config, $data) {
$additional = $data['error'] + ['cookie-headers' => $_COOKIE];
unset($additional['exceptionMsg']);