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
#!/usr/bin/env bash | |
# a list of all files that are changing with this commit | |
FILES_CHANGING=$(git diff --cached --name-only --diff-filter=ACM) | |
# if there is only one file changing | |
if [ $(echo "$FILES_CHANGING" | wc -l) -eq 1 ]; then | |
# and that file is a readme | |
README_CHANGING=$(echo $FILES_CHANGING | grep -Ei "readme(.md|.txt)?$") |
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 'formula' | |
class NeedsSnowLeopardOrNewer < Requirement | |
def satisfied? | |
MacOS.snow_leopard? | |
end | |
def message | |
"phantomjs requires Mac OS X 10.6 (Snow Leopard) or newer." | |
end |
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.google.protobuf.DescriptorProtos; | |
import com.google.protobuf.Descriptors; | |
import com.google.protobuf.DynamicMessage; | |
import com.google.protobuf.Message; | |
import java.util.HashMap; | |
/** | |
* ProtobufEnvelope - allows creating a protobuf message without the .proto file dynamically. | |
* |