Skip to content

Instantly share code, notes, and snippets.

@beryllium
beryllium / index.html.twig
Created September 29, 2014 16:49
Breakpoints in Sculpin
...
<div>
{# Split the post into an array using explode().
Because we provide a length of 2, the remainder
of the post will be stored in the second array
element, even if there are multiple breakpoints. #}
{% set break_array =
post.blocks.content|split('<!-- break -->', 2) %}
{# Output the first element of the array in raw mode #}
@beryllium
beryllium / components.md
Created June 12, 2014 21:10
Zero-Dependency Symfony Components

Zero-Dependency Symfony Components

These components have zero dependencies. They all require PHP > 5.3.3, but they can be integrated into projects without pulling in surprise dependencies. Some of them might not be terribly useful without a good binding component (e.g., DomCrawler and CSSSelector work best when using BrowserKit).

@beryllium
beryllium / Night..lrtemplate
Created May 16, 2014 20:00
Lightroom? More like Nightroom!
s = {
id = "3E89CB4C-C61A-4F25-B40C-37824BF89EA4",
internalName = "Night.",
title = "Night.",
type = "Develop",
value = {
settings = {
AutoLateralCA = 0,
Blacks2012 = 0,
BlueHue = 0,