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
# 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' |
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
(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'); | |
} | |
}) | |
} | |
})(); |
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
<?php | |
function mime_type($file) { | |
// there's a bug that doesn't properly detect | |
// the mime type of css files | |
// https://bugs.php.net/bug.php?id=53035 | |
// so the following is used, instead | |
// src: http://www.freeformatter.com/mime-types-list.html#mime-types-list | |
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
# Fail2Ban filter for SoftEther authentication failures | |
# Made by quixrick and jonisc | |
# Thanks to quixrick from Reddit! https://reddit.com/u/quixrick | |
# Further reference: http://www.vpnusers.com/viewtopic.php?f=7&t=6375&sid=76707e8a5a16b0c9486a39ba34763901&view=print | |
[INCLUDES] | |
# Read common prefixes. If any customizations available -- read them from | |
# common.local | |
before = common.conf |
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
<# | |
.SYNOPSIS | |
Clones an Subversion repository into a Git repository. | |
.DESCRIPTION | |
Clones a Subversion repository into a Git repository, for migrating from Subversion to Git. | |
This is a scripted version of the processed outlined here: | |
http://web.archive.org/web/20161107131841/https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git | |
.EXAMPLE | |
PS C:\> .\Clone-SvnToGit.ps1 https://example.com/path/to/svn/myrepo/trunk users.txt | |
This will clone the SVN repository at the given URL into a git repository folder called "myrepo", |
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
(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(), |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
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
<?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, |
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
<?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) { |
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
<?php | |
array( | |
'AL' => 'Alabama', | |
'AK' => 'Alaska', | |
'AZ' => 'Arizona', | |
'AR' => 'Arkansas', | |
'CA' => 'California', | |
'CO' => 'Colorado', | |
'CT' => 'Connecticut', |
NewerOlder