Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Siemssen fubhy

View GitHub Profile
View keybase.md

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:

@fubhy
fubhy / AvroSerializer.ts
Last active Jul 6, 2018
Avro serializer with cached schema registry
View AvroSerializer.ts
const MAGIC_BYTE = 0;
class AvroSerializer {
private schemaRegistry;
constructor(schemaRegistry) {
this.schemaRegistry = schemaRegistry;
}
View .platform routes.yaml
# 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 Jul 22, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
@function image-url($path) {
@return '../images/#{$path}';
}
.foo {
background: url(image-url('asd.png'));
@fubhy
fubhy / SassMeister-input.scss
Created Jul 21, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// 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;
View gist:864c47f3c0c6b28fdb75
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 Nov 14, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// Toolkit (v2.6.0)
// ----
@import "toolkit";
@mixin static($mixin-name, $extend: true) {
@if $extend == true {
View gist:e9b486f160fc6743267e
# 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'
View gist:8844140
use Guzzle\Cache\CacheAdapterInterface;
/**
* Custom cache adapter.
*
* Leverages the default Drupal cache bin system for caching Guzzle responses.
*/
class DrupalCacheAdapter implements CacheAdapterInterface {
/**