export MASTER01=<user>@<server>:<path>/<to>/<remote>/<folder>
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 | |
#################################### | |
#### #### | |
#### 2012 Ttech #### | |
#### Bash Router Enabler #### | |
#### #### | |
#################################### | |
# this should be the only part you need to modify |
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/sh | |
# Empty all rules | |
sudo iptables -t filter -F | |
sudo iptables -t filter -X | |
# Bloc everything by default | |
sudo iptables -t filter -P INPUT DROP | |
sudo iptables -t filter -P FORWARD DROP | |
sudo iptables -t filter -P OUTPUT DROP |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
# shortform git commands | |
alias g='git' | |
# push changes to an empty git repository for the first time | |
git push --set-upstream origin master | |
# Remove + and - from start of diff lines | |
git diff --color | sed "s/^\([^-+ ]*\)[-+ ]/\\1/" | less -r | |
# clear out git hooks |
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
### Jenkins | |
# start Jenkins in Shutdown mode | |
# init.groovy | |
import jenkins.model.*; | |
Jenkins.instance.doQuietDown(); | |
# How to Start, Stop or Restart your Jenkins Instance | |
http://<jenkins.server>/restart | |
http://<jenkins.server>/safeRestart | |
http://<jenkins.server>/exit |
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
// A new UUID must be generated for the first run and re-used for your Job DSL, the plugin updates jobs based on ID | |
UUID uuid = UUID.fromString("dd847135-8391-4f66-a54c-7f8781dc3119") // generate one @ https://www.uuidgenerator.net | |
multibranchPipelineJob("my_awesome_job") { | |
displayName "my awesome job" | |
description "multi-branch pipeline job thingy" | |
configure { | |
it / sources / 'data' / 'jenkins.branch.BranchSource' << { | |
source(class: 'jenkins.plugins.git.GitSCMSource') { | |
id(uuid) |
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/' |