This file contains hidden or 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 | |
# determine application identifier | |
mdls -name kMDItemCFBundleIdentifier /Applications/Outbank.app | |
# set german as default language (only for this app) | |
defaults write com.stoegerit.outbank.osx AppleLanguages '(de)' |
This file contains hidden or 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 javax.crypto.Cipher; | |
class Test { | |
public static void main(String[] args) { | |
try { | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
System.out.println("JCE installed: ".concat(String.valueOf(maxKeyLen >= 256))); | |
} catch (Exception e){ | |
System.out.println(e); | |
} |
This file contains hidden or 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 | |
sudo apt-get install -y xinetd | |
scp observium.ovh.cpg.de:/opt/observium/scripts/observium_agent_xinetd /tmp/ | |
sudo cp /tmp/observium_agent_xinetd /etc/xinetd.d/ | |
rm /tmp/observium_agent_xinetd | |
sudo vi /etc/xinetd.d/observium_agent_xinetd | |
scp observium.ovh.cpg.de:/opt/observium/scripts/observium_agent /tmp/ |
This file contains hidden or 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 | |
# first check current kernel version | |
uname -a | |
# generate list of dpkg commands to remove older kernel versions | |
for i in `dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) | grep ^ii | awk '{print $2}'`; do echo sudo dpkg --purge $i; done | |
# remove old kernel versions | |
#for i in `dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r) | grep ^ii | awk '{print $2}'`; do sudo dpkg --purge $i; done |
This file contains hidden or 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 | |
createuser <username> -P | |
createdb <dbname> -O <username> |
This file contains hidden or 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 | |
# make sure your router does port forwarding for TCP 80 to your NAS | |
# download and extract acmetool binary | |
wget https://github.com/hlandau/acme/releases/download/v0.0.58/acmetool-v0.0.58-linux_arm.tar.gz | |
tar -zxf acmetool-v0.0.58-linux_arm.tar.gz | |
# setup acmetool - choose let's encrypt live and WEBROOT option with path '/share/Web/.well-known/acme-challenge' | |
cd acmetool-v0.0.58-linux_arm |
This file contains hidden or 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
sudo killall -USR2 openvpn ; tail -f /var/log/syslog |
This file contains hidden or 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 | |
set -e | |
KEYSTORE=./lib/security/cacerts | |
KEYTOOL=./bin/keytool | |
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der | |
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der | |
wget https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.der | |
wget https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.der |
This file contains hidden or 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
--- | |
- name: Get package info from nexus | |
uri: url=http://{{host}}/service/local/artifact/maven/resolve?g={{group_id}}&a={{artifact_id}}&v={{artifact_version}}&r={{repository}}&p={{packaging}} | |
HEADER_Accept="application/json" | |
return_content=yes | |
register: nexus_result | |
- name: Save SHA1 checksum of package | |
copy: content="{{nexus_result.json.data.sha1}}" dest="./{{artifact_id}}.{{packaging}}.sha1" |
This file contains hidden or 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
package de.cpg.test; | |
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | |
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | |
import lombok.Builder; | |
import lombok.Value; | |
@Value | |
@Builder(builderClassName = "Builder") | |
@JsonDeserialize(builder = ImmutableData.Builder.class) |