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 Controller from '@ember/controller'; | |
import { computed } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
@computed | |
get root() { | |
const root = this.store.createRecord('test', { name: 'root' }); | |
for (let i = 0; i < 5; i++) { |
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 java.io.Serializable; | |
import java.lang.invoke.SerializedLambda; | |
import java.lang.reflect.Method; | |
import java.util.function.Function; | |
/** | |
* This interface decorates the standard {@link Function} interface with the {@link Serializable} interface | |
* to introspect method references (and other lambdas) that are bound to this type. | |
* | |
* @see #serialized() |
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
# | |
# This function can be prepended to any single Bash command to display a notification when it completes. | |
# | |
# Examples: | |
# notify sleep 1 | |
# notify false | |
# | |
function notify() { | |
COMMAND=$(echo "$@" |sed -Ee 's/([\"])/\\\1/g') # capture and escape the command for osascript | |
if "$@" # execute the command |
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 com.fasterxml.jackson.databind.JsonNode; | |
import java.util.Spliterator; | |
import java.util.Spliterators; | |
import java.util.stream.Stream; | |
import java.util.stream.StreamSupport; | |
/** | |
* This interface contains utility methods for processing {@link JsonNode}'s using Java 8 {@link Stream}s. | |
*/ |
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 Ember from 'ember'; | |
var firstValue = 'A'; | |
var otherValue = 'B'; | |
var defaultValue = 'C'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
values: [ |