Skip to content

Instantly share code, notes, and snippets.

View fubhy's full-sized avatar

Sebastian Lorenz fubhy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fubhy on github.
  • I am fubhy (https://keybase.io/fubhy) on keybase.
  • I have a public key ASAKxK7KBF1tpad7PTTy1dVtVBvJPDJaHKOya_H8JI1fJAo

To claim this, I am signing this object:

0x307012a4904267fD20C117bB71DC61c3e505d3F6
@fubhy
fubhy / AvroSerializer.ts
Last active July 6, 2018 17:29
Avro serializer with cached schema registry
const MAGIC_BYTE = 0;
class AvroSerializer {
private schemaRegistry;
constructor(schemaRegistry) {
this.schemaRegistry = schemaRegistry;
}
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
"http://{default}/":
type: upstream
upstream: "php:php"
"http://www.{default}/":
@fubhy
fubhy / SassMeister-input.scss
Created July 22, 2015 12:47
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@function image-url($path) {
@return '../images/#{$path}';
}
.foo {
background: url(image-url('asd.png'));
@fubhy
fubhy / SassMeister-input.scss
Created July 21, 2015 13:08
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$rendering-for-ie: true !default;
@mixin media($media-query, $render-for-ie: true) {
@if $rendering-for-ie == false {
@media (#{$media-query}) {
@content;
import React from 'react/addons';
import isArray from 'lodash/lang/isArray';
import isObject from 'lodash/lang/isObject';
import isFunction from 'lodash/lang/isFunction';
// @todo Remove this once React 0.14 lands (parent based contexts).
export default function renderChildren() {
const { children, ...props } = this.props;
if (isFunction(children)) {
@fubhy
fubhy / SassMeister-input.scss
Created November 14, 2014 11:41
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// Toolkit (v2.6.0)
// ----
@import "toolkit";
@mixin static($mixin-name, $extend: true) {
@if $extend == true {
@fubhy
fubhy / gist:e9b486f160fc6743267e
Created June 30, 2014 15:13
Compass and LibSass
# Convert .scss to .css (including live reload). In some cases (e.g. when using
# Compass) the 'images' task has to run before this one so that utility
# functions like 'image-url' don't cause errors when evaluated before the image
# has been created.
gulp.task 'styles', ['images'], ->
sassConfig =
outputStyle: if isProduction then 'compressed' else 'expanded'
# Source maps are currently broken in 'gulp-sass'.
#sourceComments: 'map'
use Guzzle\Cache\CacheAdapterInterface;
/**
* Custom cache adapter.
*
* Leverages the default Drupal cache bin system for caching Guzzle responses.
*/
class DrupalCacheAdapter implements CacheAdapterInterface {
/**