Skip to content

Instantly share code, notes, and snippets.

View bertvv's full-sized avatar

Bert Van Vreckem bertvv

View GitHub Profile
@bertvv
bertvv / WindowsServerBootstrap.ps1
Last active March 27, 2023 10:08
Bootstrap script for basic Windows Server configuration
# Name: WindowsBootstrap.ps1
# Description: Boxstarter bootstrap script for basic Windows Server configuration
# Author: Bert Van Vreckem <bert.vanvreckem@gmail.com>
#
# See also:
# - https://blog.jessfraz.com/post/windows-for-linux-nerds/
#--- Remote management ---
# Enable Ansible Remoting
@bertvv
bertvv / ConfigureWindowsServer.ps1
Last active September 13, 2017 22:10
Basic configuration Windows Server
# ConfigureWindowsServer.ps1 -- Basic configuration Windows Server 2012R2
# Enable Ansible Remoting
$scriptPath = ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
Invoke-Command -ScriptBlock ([scriptblock]::Create($scriptPath)) -ArgumentList "-Verbose -SkipNetworkProfileCheck -CertValidityDays 2492"
# Allow Ping
Get-NetFirewallRule -DisplayName "*Echo Request*" | Set-NetFirewallRule -enabled true
# Enable Remote Desktop
@bertvv
bertvv / .gitattributes
Created August 18, 2017 17:22
Set line endings of specific file types in a Git repo
# Default behaviour
* text=auto
# Shell scripts should have Unix endings
*.sh text eol=lf
*.bats text eol=lf
*.py text eol=lf
# Windows Batch or PowerShell scripts should have CRLF endings
*.bat text eol=crlf
@bertvv
bertvv / init-git.sh
Last active June 11, 2017 19:01
Initial setup of Git
#!/bin/bash
username='Johnny User'
email='johnny.user@example.com'
# Set user's name and email
git config --global user.name ${username}
git config --global user.email ${email}
# Set default push behaviour (Git will issue a warning on each push when not set)
@bertvv
bertvv / readme.md
Last active August 29, 2015 14:20
Test for changes in validation output in Ansible
@bertvv
bertvv / accessible-colors.md
Last active December 11, 2018 06:03
Colors

Accessible color palette

A set of colors that is unambiguous both to colorblinds and non-colorblinds.

Color name R G B
Black 0 0 0
Orange 230 159 0
Sky Blue 86 180 233
Bluish Green 0 158 115
@bertvv
bertvv / TestLocalHost.java
Created December 16, 2014 10:09
Medium post: Troubleshooting slow Netbeans startup
public class TestLocalHost {
public static void main(String[] args) throws Exception {
System.out.println(java.net.InetAddress.getLocalHost());
}
}
@bertvv
bertvv / thread-dump.txt
Last active August 29, 2015 14:11
Medium post: Troubleshooting Netbeans slow startup
[...]
"AWT-EventQueue-0" #20 prio=6 os_prio=0 tid=0x00007f3728102800 nid=0x19f3 waiting for monitor entry [0x00007f377fbf9000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.net.InetAddress.getLocalHost(InetAddress.java:1465)
- waiting to lock <0x00000000c080a788> (a java.lang.Object)
at sun.font.FcFontConfiguration.getFcInfoFile(FcFontConfiguration.java:352)
at sun.font.FcFontConfiguration.readFcInfo(FcFontConfiguration.java:425)
at sun.font.FcFontConfiguration.init(FcFontConfiguration.java:94)
[...]
"main" #15 prio=5 os_prio=0 tid=0x00007f37a4612000 nid=0x19ee waiting for monitor entry [0x00007f3784dce000]
@bertvv
bertvv / pandoc.Makefile
Last active November 24, 2022 08:55
Makefile for Markdown -> PDF using pandoc
# Generate PDFs from the Markdown source files
#
# In order to use this makefile, you need some tools:
# - GNU make
# - Pandoc
# - LuaLaTeX
# - DejaVu Sans fonts
# Directory containing source (Markdown) files
source := src