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
#!groovy | |
/* | |
* This script configures the Jenkins base URL. | |
*/ | |
import jenkins.model.JenkinsLocationConfiguration | |
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0] | |
location.url = 'https://jenkins-as-code-poc.devtail.io/' |
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
While running, Terraform sometimes tests experimental features in the | |
background. These features cannot affect real state and never touch | |
real infrastructure. If the features work properly, you see nothing. | |
If the features fail, this message appears. | |
The following failures happened while running experimental features. | |
Please report a Terraform bug so that future Terraform versions that | |
enable these features can be improved! | |
You can report an issue at: https://github.com/hashicorp/terraform/issues |
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
FROM tomcat:8.0.38 | |
# Place the code version inside the webapps directory | |
ARG PACKAGE_VERSION | |
RUN echo "${PACKAGE_VERSION}" >> /usr/local/tomcat/webapps/version.txt | |
COPY project.war /usr/local/tomcat/webapps/project.war | |
COPY docker-entrypoint.sh / | |
RUN chmod +x /docker-entrypoint.sh | |
ENTRYPOINT ["/docker-entrypoint.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
# Original script taken and modified from http://shrekpoint.blogspot.de/2012/08/taking-ownership-of-dcom-registry.html | |
# | |
# Enable remote DCOM access to the WbemScripting.SWbemLocator class on 64-bit Windows 7/8 and Server 2012 machines, | |
# by setting the necessary keys inside the registry. | |
# Use this script at your own risk. | |
# I do not guarantee that it works, nor do I give any kinds of support in case it doesn't | |
Try { | |
[void][TokenAdjuster] | |
} Catch { |
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
sshd_port: 5133 | |
sshd_groups: | |
- name: devops | |
ssh: | |
allow_tcp_fwd: True | |
allow_agent_fwd: True | |
x11_fwd: True | |
- name: developers | |
ssh: |
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 | |
SENSITIVE_FILES="roles/ssh/templates/sshd_config.j2.enc" | |
if [ "$1" != "clean" ] && [ "$1" != "decrypt" ] | |
then | |
echo "only 'clean' or 'decrypt' are allowed" | |
exit 1 | |
fi |
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
#!/usr/bin/env python3 | |
""" | |
Using Fermat's little theorem to calculate nCk mod m, for k < m and m is prime | |
Two versions: | |
1. Pre-Compute factorials and multiplicative inverses in O(n*logn) --> later lookup in O(1) | |
2. Compute directly --> no lookup --> each time O(n) | |
""" |
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 | |
# A simple django project deployment script for jenkins | |
BUILD_ROOT="/srv/www/django/d_project/" | |
MNGR=${BUILD_ROOT}"manage.py" | |
# source python env | |
echo "Sourcing python env..." | |
source ${BUILD_ROOT}"py-env/bin/activate" | |
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
<!-- Simple webpage for Django UI example test --> | |
<html> | |
<head> | |
</head> | |
<body> | |
<p id="test">Hello World!</p> | |
</body> | |
</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
# Simple static header for update-motd framework | |
COLOR_GREEN="\033[0;32m" | |
# print personal static banner in green | |
printf "${COLOR_GREEN} | |
_____ .__ .__ .__ | |
_/ ____\|__| ______| |__ |__| | |
\ __\ | | / ___/| | \ | | | |
| | | | \___ \ | Y \| | |