In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
| # These are fragments of the configuration that will need to be updated | |
| # --- | |
| ## GitLab URL | |
| ##! URL on which GitLab will be reachable. | |
| ##! For more details on configuring external_url see: | |
| ##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab | |
| external_url 'https://gitlab.your-fqdn.com' | |
| #external_url 'http://gitlab.internal.lan' |
| (function (lodash) { | |
| if (!lodash.hasOwnProperty('matchOne')) { | |
| lodash.mixin(lodash, { | |
| matchOne: function () { | |
| var values = lodash(arguments).values(), | |
| test = values.head(), | |
| odd = values.drop(1).filter(function (_void, index) { | |
| return index % 2 === 0; | |
| }).reverse(), |
| (function () { | |
| if (!Object.constructor.prototype.hasOwnProperty('name')) { | |
| Object.defineProperty(Object.constructor.prototype, 'name', { | |
| get: function () { | |
| return this.toString().trim().replace(/^\S+\s+(\w+)[\S\s]+$/, '$1'); | |
| } | |
| }) | |
| } | |
| })(); |
| javascript | |
| ES6ValidationInspection | |
| JSAccessibilityCheckInspection | |
| JSBitwiseOperatorUsageInspection | |
| JSCheckFunctionSignaturesInspection | |
| JSClosureCompilerSyntaxInspection | |
| JSCommentMatchesSignatureInspection | |
| JSComparisonWithNaNInspection | |
| JSConsecutiveCommasInArrayLiteralInspection |
| <?php | |
| $file = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_post_id, |
| <?php | |
| /** | |
| * Insert an attachment from an URL address. | |
| * | |
| * @param String $url | |
| * @param Int $parent_post_id | |
| * @return Int Attachment ID | |
| */ | |
| function crb_insert_attachment_from_url($url, $parent_post_id = null) { |
| <?php | |
| array( | |
| 'AL' => 'Alabama', | |
| 'AK' => 'Alaska', | |
| 'AZ' => 'Arizona', | |
| 'AR' => 'Arkansas', | |
| 'CA' => 'California', | |
| 'CO' => 'Colorado', | |
| 'CT' => 'Connecticut', |
| /* Small */ | |
| @media (min-width: 480px) { | |
| [class*='uk-push-small-'], | |
| [class*='uk-pull-small-'] { position: relative; } | |
| /* | |
| * Push | |
| */ |
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| * Modified by Michael Keyser | |
| * 2018-03-14 |