This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HTTPFetchNetworkInterface, printAST } from 'apollo-client' | |
require('isomorphic-fetch') | |
/* | |
* Traverses the node recursively and searches for File or FileList | |
* occurences and replaces theire values with the path to the value inside | |
* the node. It returns an object mapping the paths to theire File/FileList. | |
*/ | |
function recurse(node, path = []) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Renders an ItemContainer as a <ul> element and its containing items as <li> elements. | |
# Prepared to use inside the topbar of Twitter Bootstrap http://twitter.github.com/bootstrap/#navigation | |
# | |
# Register the renderer and use following code in your view: | |
# render_navigation(level: 1..2, renderer: :bootstrap_topbar_list, expand_all: true) | |
class BootstrapTopbarList < SimpleNavigation::Renderer::Base | |
def render(item_container) | |
if options[:is_subnavigation] | |
ul_class = "dropdown-menu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Activity extends ActivityComponent { | |
private int time; | |
public Activity(int t) { | |
this.time = t; | |
} | |
public int count() { | |
return time; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
require 'cucumber/rails' | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'rspec/rails' | |
require 'capybara/rails' | |
Capybara.default_selector = :css | |
Capybara.default_driver = :webkit |