Skip to content

Instantly share code, notes, and snippets.

View virtualadrian's full-sized avatar
🤓
Geek: A knowledgeable and obsessive enthusiast.

VirtualAdrian virtualadrian

🤓
Geek: A knowledgeable and obsessive enthusiast.
View GitHub Profile
@virtualadrian
virtualadrian / .editorconfig
Created June 14, 2023 00:20 — forked from patrick-werner/.editorconfig
Google Java CodeStyle editorconfig
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = false
max_line_length = 100
tab_width = 2
ij_continuation_indent_size = 4
ij_formatter_off_tag = @formatter:off
@virtualadrian
virtualadrian / openconnect.md
Created May 29, 2021 03:47 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@virtualadrian
virtualadrian / openconnect.md
Created May 29, 2021 03:47 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@virtualadrian
virtualadrian / nginx-tls.conf
Created May 5, 2021 22:38 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@virtualadrian
virtualadrian / sysctl-proxmox-tune.conf
Created April 26, 2021 09:09 — forked from sergey-dryabzhinsky/sysctl-proxmox-tune.conf
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@virtualadrian
virtualadrian / proxy.apache.conf
Created April 5, 2021 11:21 — forked from chrisjhoughton/proxy.apache.conf
Sample Nginx reverse proxy to Apache set up for Wordpress.
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
@virtualadrian
virtualadrian / Docker connect to remote server.md
Created December 27, 2020 04:25 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@virtualadrian
virtualadrian / readme
Created September 11, 2020 03:48 — forked from lookingcloudy/readme
Setup internal DNS server using DNSMasq on OMV server
# This is for a home network
# My OMV server is: 10.0.0.99
# I kept DHCP running on my router for simplicity
# Install dnsmasq
apt-get install dnsmasq
# Edit the configuration file
nano /etc/dnsmasq.conf
@virtualadrian
virtualadrian / Jenkinsfile
Created May 4, 2020 04:47 — forked from oifland/Jenkinsfile
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@virtualadrian
virtualadrian / Makefile
Created March 26, 2020 08:17 — forked from ryu1kn/Makefile
Encrypt/decrypt with AWS KMS using AWS cli
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli
KEY_ID=alias/my-key
SECRET_BLOB_PATH=fileb://my-secret-blob
SECRET_TEXT="my secret text"
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target
encrypt-text: