- Open a webpage that uses the CA with Firefox
- Click the lock-icon in the addressbar -> show information -> show certificate
- the certificate viewer will open
- click details and choose the certificate of the certificate-chain, you want to import to CentOS
- click "Export..." and save it as .crt file
- Copy the .crt file to
/etc/pki/ca-trust/source/anchors
on your CentOS machine - run
update-ca-trust extract
- test it with
wget https://thewebsite.org
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
[Unit] | |
Description=Update current instance IP to Cloud DNS. | |
After=network-online.target auditd.service | |
[Service] | |
#ExecStart=/opt/compute-engine-ddns.sh <zone-name> <domain> | |
Type=oneshot | |
[Install] | |
WantedBy=multi-user.target |
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
# Many thanks to Z-NERD for this, and this script is a copy of the one provided on his website | |
# Here is a link to the original script: https://z-nerd.com/blog/2020/03/31-intune-win32-apps-powershell-script-installer/ | |
# This is here just in case the post gets removed/lost :) | |
$argsString = "" | |
If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") { | |
Try { | |
foreach($k in $MyInvocation.BoundParameters.keys) | |
{ | |
switch($MyInvocation.BoundParameters[$k].GetType().Name) |
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 | |
sudo bash -c "sync \ | |
&& apt-get update \ | |
&& apt-get -y upgrade \ | |
&& apt-get -y dist-upgrade \ | |
&& sed -i 's/stretch/buster/g' /etc/apt/sources.list \ | |
&& sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list \ | |
&& apt-get update \ | |
&& apt-get -y upgrade \ | |
&& apt-get -y dist-upgrade \ |
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
.col-xs-1, .col-ms-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-ms-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-ms-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-ms-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-ms-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-ms-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-ms-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-ms-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-ms-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-ms-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-ms-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-ms-12, .col-sm-12, .col-md-12, .col-lg-12 { | |
position: relative; | |
min-height: 1px; | |
padding-right: 15px; | |
padding-left: 15px; | |
} | |
@media (min-width: 480px) and (max-width: 767px) { | |
.container { | |
max-width: 748px; |
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
LoadModule ssl_module modules/mod_ssl.so | |
LoadModule proxy_module modules/mod_proxy.so | |
LoadModule filter_module modules/mod_filter.so | |
LoadModule substitute_module modules/mod_substitute.so | |
<VirtualHost *:443> | |
ServerName yourdomain.com:443 | |
SSLEngine On | |
SSLProxyEngine On |
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
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while (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
#!/bin/bash | |
# | |
# Copyright (c) 2016 Katsuya SAITO | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
# | |
# @(#) softethervpn_letsencrypt_cert_autoupdate.sh ver.0.1.0 2016.02.20 | |
# | |
# Usage: softethervpn_letsencrypt_cert_autoupdate.sh CommonName WEBROOT PASSWORD MAIL | |
# |
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
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 dateReviver(key, value) { | |
if (typeof value === 'string') { | |
var a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); | |
if (a) { | |
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6])); | |
} | |
} | |
return value; | |
}; |
NewerOlder