Skip to content

Instantly share code, notes, and snippets.


Brad Jones bradjones1

View GitHub Profile
bradjones1 / config.rb
Last active Oct 5, 2016
Compass inline svg with string replacement (e.g., for fills)
View config.rb
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 / gist:f8c16d640ca8d1f2d559
Last active Jan 30, 2016
Log simplesamlphp error info to syslog, for cross-reference to trackID
View gist:f8c16d640ca8d1f2d559
* 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];