git clone path/to/test/repo.git
git config push.default matching
git branch -a
* master
| git rev-parse: RefName ======> SHA1 | |
| git name-rev: SHA1 <===== RefName | |
| # Convert the reference name HEAD to its corresponding SHA1 | |
| git rev-parse HEAD # Assuming for the sake of example that it outputs 1234567 | |
| # Convert the SHA1 (1234567) into its reference name (should output HEAD in our example) | |
| git name-rev 1234567 | |
| # or else |
| private static RegExp buildRegexpLangRfc5646() | |
| { | |
| String extLang = "([A-Za-z]{3}(-[A-Za-z]{3}){0,2})"; | |
| String language = | |
| "(([a-zA-Z]{2,3}(-" + extLang + ")?)|([a-zA-Z]{5,8}))"; | |
| String script = "([A-Za-z]{4})"; | |
| String region = "([A-Za-z]{2}|\\d{3})"; | |
| String variant = "([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))"; | |
| String singleton = "(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])"; | |
| String extension = "(" + singleton + "(-[A-Za-z0-9]{2,8})+)"; |
| git name-rev --name-only $(git rev-parse HEAD) |
| launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |
| prefix = "http://"; | |
| url = "http://example.com"; | |
| url.substring(0, prefix.length) === prefix; // true |
| nc -kl 12345 # netcat listen on port 12345 and keep-alive |
| describe MyController do | |
| before do | |
| # ... | |
| # Stub MyController.action to always return OK | |
| def @controller.action | |
| render status: 200, nothing: true | |
| end |
| en: | |
| # ~~~~~~~~ | |
| # Model Errors | |
| # ~~~~~~~~ | |
| activemodel: | |
| errors: | |
| models: | |
| bidrequest: | |
| not_json: "Not a valid JSON" | |
| url_not_valid: "Not a valid URL" |