This file contains hidden or 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 'formula' | |
| class Librsvg < Formula | |
| homepage 'https://live.gnome.org/LibRsvg' | |
| url 'https://git.gnome.org/browse/librsvg/snapshot/librsvg-2.40.5.tar.xz' | |
| sha256 '3d7d583271030e21acacc60cb6b81ee305713c9da5e98429cbd609312aea3632' | |
| bottle do | |
| cellar :any | |
| revision 1 |
This file contains hidden or 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 Foundation | |
| func ifOptionalHasValue<T>(optional: T?, then: (T) -> Void) { | |
| ifOptionalHasValue(optional, { (value) -> Void in | |
| then(value) | |
| }) { () -> Void in | |
| // do nothing | |
| } | |
| } |
This file contains hidden or 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
| ObservableList movieSuggestions = new ObservableList(); | |
| var searchInput = document.querySelector("#search-input"); | |
| var onInput = new EventStream(searchInput.onKeyUp).merge(searchInput.onChange) | |
| .map((_) => searchInput.inputValue) | |
| .debounce(new Duration(milliseconds: 250)) | |
| .distinct(); | |
| var suggestions = onInput.flatMapLatest((search) { |
This file contains hidden or 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
| library test_framework; | |
| import 'package:unittest/unittest.dart'; | |
| // RSpec like framework | |
| typedef Closure(); | |
| class Example { | |
| String name; | |
| Closure body; |
This file contains hidden or 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
| // Assumes that we're using mdv_observe | |
| // Verbose way | |
| class Person extends ObservableBase { | |
| @observable | |
| String firstName; | |
| @observable | |
| String lastName; |
This file contains hidden or 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 'formula' | |
| class Maven <Formula | |
| url 'http://www.apache.org/dist/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.tar.gz' | |
| homepage 'http://maven.apache.org/' | |
| md5 '3f829ed854cbacdaca8f809e4954c916' | |
| def install | |
| rm_f Dir["bin/*.bat"] | |
| prefix.install %w[bin conf boot lib] |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| # This script installs to /usr/local only. To install elsewhere you can just | |
| # untar https://github.com/mxcl/homebrew/tarball/master anywhere you like. | |
| module Tty extend self | |
| def blue; bold 34; end | |
| def white; bold 39; end | |
| def red; underline 31; end | |
| def reset; escape 0; end | |
| def bold n; escape "1;#{n}" end |
NewerOlder