Skip to content

Instantly share code, notes, and snippets.

View sdboyer's full-sized avatar

sam boyer sdboyer

View GitHub Profile
(require '[clojure.core.async :as a])
(def xform (comp (map inc)
(filter even?)
(dedupe)
(mapcat range)
(partition-all 3)
(partition-by #(< (apply + %) 7))
(mapcat flatten)
(random-sample 1.0)
@sdboyer
sdboyer / gist:5920080
Last active December 19, 2015 07:39 — forked from EclipseGc/gist:5919630
<?php
/**
* @Page(
* id = "my_page",
* title = @Translation("My page")
* routes = {
* @Route("/another/page/{foo}")
* @Route("/my/page/{foo}", "SomeOtherClass::access")
* }
id: frontend
label: Frontend master display
layout: static_layout:layout__core
layoutSettings: { }
staticContexts:
urlgoober:
type: string
value: path/to/node
derivedContexts:
node_author:
@sdboyer
sdboyer / gist:5823704
Last active December 18, 2015 18:09 — forked from EclipseGc/gist:5823702
<?php
protected function renderBlocks(Request $request, BoundDisplayInterface $display) {
$blockFragments = array();
foreach ($display->getAllOuterBlockConfig() as $id => $config) {
$block = $display->getBlock($id);
if ($block instanceof SystemMainBlock) {
$block->setControllerClosure($request->attributes->get('_content_closure'));
@sdboyer
sdboyer / classes.yaml
Last active December 18, 2015 07:00 — forked from Snugug/classes.yaml
groupings:
layout-small: 'Small layout, active until 559px'
layout-medium: 'Medium Layout, active at 600px'
classes:
l-s-1-4:
group: layout-small
description: 'Span one of four columns'
l-s-2-4:
group: layout-small
description: 'Span two of four columns'
@sdboyer
sdboyer / .gitconfig
Created April 13, 2011 16:08 — forked from rfay/.gitconfig
# Put this in your .gitconfig
[url "ssh://git@git.drupal.org/sandbox/"]
insteadOf = "dos:"
[url "ssh://git@git.drupal.org/project/"]
insteadOf = "do:"