Skip to content

Instantly share code, notes, and snippets.

View yansusanto's full-sized avatar
:octocat:
Hustling

Yan Susanto yansusanto

:octocat:
Hustling
View GitHub Profile
export const squareImage = graphql`
fragment squareImage on File {
childImageSharp {
fluid(maxWidth: 520, maxHeight: 400) {
...GatsbyImageSharpFluid
}
}
}
`;
@yansusanto
yansusanto / default.vcl
Created September 9, 2014 13:35
WordPress 4.0 + Varnish 3.0
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge {
"127.0.0.1";
"localhost";
}
class Top_Bar_Walker extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
$output .= "\n<ul class=\"sub-menu dropdown\">\n";
}
function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
$item_html = '';
parent::start_el( $item_html, $object, $depth, $args );
$output .= ( $depth == 0 ) ? '<li class="divider"></li>' : '';