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
# Install mysql | |
brew install mysql | |
# pin the version so you don't override it accidentally with upgrate | |
brew pin mysql | |
# Copy launch agent into place | |
mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/<version>/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ | |
# Edit launch agent and set both keepalive and runatload at startup to false |
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 WebLinkValidator { | |
private final static String linkRegex = "((([A-Za-z]{3,9}:(?://)?)(?:[\\-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9\\.\\-]+|(?:www\\.|[\\-;:&=\\+\\$,\\w]+@)[A-Za-z0-9\\.\\-]+)((?:/[\\+~%/\\.\\w\\-]*)?\\??(?:[\\-\\+=&;%@\\.\\w]*)#?(?:[\\.\\!/\\\\\\w]*))?)"; | |
/** | |
* Examples of valid web links are: | |
* <ul> | |
* <li>"www.site.com"</li> | |
* <li>"http://www.site.com"</li> | |
* <li>"mailto:lucy@site.com"</li> |
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
[url "git@github.com:"] | |
insteadOf = "gh:" | |
pushInsteadOf = "github:" | |
pushInsteadOf = "git://github.com/" | |
[url "git://github.com/"] | |
insteadOf = "github:" | |
[url "git@gist.github.com:"] | |
insteadOf = "gst:" | |
pushInsteadOf = "gist:" | |
pushInsteadOf = "git://gist.github.com/" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. | |
~ | |
~ Licensed under the Apache License, Version 2.0 (the "License"); | |
~ you may not use this file except in compliance with the License. | |
~ You may obtain a copy of the License at | |
~ | |
~ http://www.apache.org/licenses/LICENSE-2.0 | |
~ |
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
// email validation, supports only lower case emails | |
@Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\." | |
+"[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" | |
+"(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", | |
message="Invalid Email") | |
protected String email; | |
// not blank | |
@NotNull(message="Title can not be NULL.") | |
@Pattern(regexp="^(?!\\s*$).+", message="Title can not be empty.") |
NewerOlder