Skip to content

Instantly share code, notes, and snippets.

View bvansomeren's full-sized avatar

Barry van Someren bvansomeren

View GitHub Profile
@chetcuti
chetcuti / ansible-install-virtualmin.yml
Created August 23, 2020 00:50
ansible-install-virtualmin.yml
---
- hosts: virtualmin
remote_user: '{{ standard_user }}'
become: true
become_method: sudo
tasks:
- name: 'remove unneeded packages'
apt:
name:
- libnet-ssleay-perl
@mitchty
mitchty / install.sh
Created November 1, 2015 23:18
bsd install
#!/bin/sh
zpool destroy zroot
for disk in 0 1; do
gpart destroy -F ada${disk}
gpart create -s gpt ada${disk}
gpart add -a 4k -s 64k -t freebsd-boot -l boot${disk} ada${disk}
gpart add -a 4k -s 2G -t freebsd-swap -l swap${disk} ada${disk}
gpart add -a 4k -s 32G -t freebsd-zfs -l zroot${disk} ada${disk}
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada${disk}
@kofemann
kofemann / tuned.conf
Last active November 1, 2023 07:44
Tuned profile for PostgreSQL server on CENTOS-7
#
# tuned configuration for PostgresSQL servers
# /usr/lib/tuned/postgres-db-server/tuned.conf
#
[cpu]
force_latency=1
governor=performance
energy_perf_bias=performance
min_perf_pct=100
@ereli
ereli / gist:e868fcaeb660e420d7a6
Last active April 3, 2024 10:01
Installing Centos using DHCP, TFTP and Kickstart

Installing Centos using DHCP, TFTP and Kickstart Files.

We want to deploy physical nodes before cluster installation, in order to speed up the deployment, we'd like to automate most of the process, requiring us only to enter hostnames and IP address. we will need:

  • A DHCP Server
  • TFTP Server
  • HTTP Server
  • Centos ISO file
  • Optionally: local repo server, local dns server, local ntp server.
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@nileshgr
nileshgr / ipfw.rules
Last active June 11, 2021 11:58
IPFW rules for internal and external networking in FreeBSD jails
#!/bin/sh
alias ipfw=/sbin/ipfw
ipfw -f flush
# Make sure you have ipfw_nat_load=yes in loader.conf
# Map port 2201 on first public IP to first jail's port 22
ipfw nat 1 config ip <public ip> unreg_only same_ports redirect_port tcp 192.168.0.1:22 2201
@yut148
yut148 / gist:5540877
Created May 8, 2013 14:35
nginx 1.4.0 official rpm build configure. Adding spdy --with-http_spdy_module
./configure \
--prefix=%{_sysconfdir}/nginx \
--sbin-path=%{_sbindir}/nginx \
--conf-path=%{_sysconfdir}/nginx/nginx.conf \
--error-log-path=%{_localstatedir}/log/nginx/error.log \
--http-log-path=%{_localstatedir}/log/nginx/access.log \
--pid-path=%{_localstatedir}/run/nginx.pid \
--lock-path=%{_localstatedir}/run/nginx.lock \
--http-client-body-temp-path=%{_localstatedir}/cache/nginx/client_temp \
--http-proxy-temp-path=%{_localstatedir}/cache/nginx/proxy_temp \
@mychalvlcek
mychalvlcek / JSF - Bootstrap alert renderer
Last active July 26, 2018 17:12
Component which overrides the default JSF Message renderer by Bootstrap alert design.
Component which overrides the default JSF Message renderer by Bootstrap alert design.
faces-config.xml:
<render-kit>
<renderer>
<component-family>javax.faces.Messages</component-family>
<renderer-type>javax.faces.Messages</renderer-type>
<renderer-class>com.example.yourpackage.BootstrapMessagesRenderer</renderer-class>
</renderer>
@AstonJ
AstonJ / gist:2896818
Created June 8, 2012 16:47
Install/Upgrade Ruby on CentOS 6.2
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel