View cleanup.groovy
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 org.sonatype.nexus.repository.storage.Component | |
import org.sonatype.nexus.repository.storage.StorageFacet; | |
def retentionCount = 15 | |
def repositoryName = 'releases' | |
def dryRun = true | |
log.info("Cleanup script started! Dry Run Mode: $dryRun"); | |
def repo = repository.repositoryManager.get(repositoryName); | |
def tx = repo.facet(StorageFacet.class).txSupplier().get(); |
View scan-assets.groovy
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 org.apache.commons.io.FileUtils | |
import org.sonatype.nexus.repository.storage.Asset | |
import org.sonatype.nexus.repository.storage.Component; | |
import org.sonatype.nexus.repository.storage.Query | |
import org.sonatype.nexus.repository.storage.Query.Builder; | |
import org.sonatype.nexus.repository.storage.StorageFacet | |
def repo = repository.repositoryManager.get('releases') | |
StorageFacet storageFacet = repo.facet(StorageFacet) |
View gist:71055dd04b0c89f51d8f
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
// generate chcp.manifest | |
gulp.task('chcp-manifest', ['index'], function() { | |
return gulp.src(['**/*', '!chcp.*'], { cwd: path.join(targetDir, '') }) | |
.pipe(plugins.buster({ fileName: 'chcp.manifest', algo: 'md5', transform: function(hashes) { | |
var transformed = []; | |
for (var file in hashes) { | |
transformed.push({ file: file, hash: hashes[file] }); | |
} | |
return transformed; | |
}})) |
View jenkins-job-dsl.groovy
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
mavenJob("${name}") { | |
goals('clean install findbugs:findbugs pmd:pmd cobertura:cobertura') | |
logRotator { | |
numToKeep(5) | |
artifactNumToKeep(1) | |
} | |
scm { | |
git { |
View cleanrepo.sh
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
#!/bin/bash | |
DRY_RUN=1 | |
if [ "$1" != "" ]; then | |
DRY_RUN="$1" | |
fi | |
MAX_VERSION=2 | |
if [ "$2" != "" ]; then | |
MAX_VERSION="$2" | |
fi |
View client.js
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
var fs = require('fs'); | |
var Primus = require('primus'); | |
var Socket = Primus.createSocket({ transformer: 'websockets' }); | |
var socket = new Socket('https://localhost:8443', { transport: { | |
key: fs.readFileSync('client.key'), | |
cert: fs.readFileSync('client.crt'), | |
rejectUnauthorized: false | |
} }); |
View mjpeg-directives.html
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
<mjpeg url="videoUrl"></mjpeg> |