Skip to content

Instantly share code, notes, and snippets.

View hannesbe's full-sized avatar
🏠
Working from home

Hannes Van de Vel hannesbe

🏠
Working from home
View GitHub Profile
@hannesbe
hannesbe / dotfiles-bootstrap.sh
Last active November 5, 2016 23:20
Launch dotfiles bootstrapper. Installs repo & deps. Then launches actual installer & changes shell.
#!/usr/bin/env bash
curl -sSL https://raw.githubusercontent.com/Connexeon/dotfiles/master/bootstrap | bash -s
@hannesbe
hannesbe / Using icons on Markdown.md
Last active November 27, 2020 00:41
Using icons in Markdown

Using icons in Markdown

Icons are known to be supported in editors StackEdit & Marxico.

Base icons

Show an icon .

@hannesbe
hannesbe / conf\conf.user.json
Last active November 18, 2020 12:53
Typora user config (goes in %USERPROFILE%\Roaming\Typora\conf\conf.user.json) & base theme css (goes in %USERPROFILE%\Roaming\Typora\themes)
/**
Typora user config
C:\Users\hava\AppData\Roaming\Typora\conf\conf.user.json */
{
"width" : null, // Integer - Window's width in pixels. Default is null (last window width)
"height" : null, // Integer - Window's height in pixels. Default is null (last window height)
"directWrite": true, // Boolean - Enables DirectWrite font rendering system on Windows. Default is true.
"defaultFontFamily": {
"standard": null, //String - Defaults to "Times New Roman".
"serif": null, // String - Defaults to "Times New Roman".
@hannesbe
hannesbe / pdns-mysql-update-snippets.sql
Last active April 8, 2017 02:37
SQL snippets to bulk update records & soa
/* Update SOA records for zones having a certain IP in the content */
UPDATE records
SET `content` = 'ns1.connexeon.com. domains.connexeon.com. 2017040701 1200 400 1209600 300'
WHERE `id` IN
(SELECT `id`
FROM records_copy
WHERE `type`='SOA'
AND `domain_id` IN
(SELECT DISTINCT `domain_id`
FROM records_copy
@hannesbe
hannesbe / add-connexeon-vpn.ps1
Last active January 31, 2018 17:32
Powershell script to create PPTP VPN Connexeon in Windows, for all users & no additional login required client has joined AD
Add-VpnConnection -Name "VPN Connexeon" -ServerAddress "vpn.connexeon.com" -TunnelType Pptp -EncryptionLevel Required -AuthenticationMethod MSChapv2 -AllUserConnection -RememberCredential -PassThru -UseWinlogonCredential
Set-VpnConnection "VPN Connexeon" -AllUserConnection -SplitTunneling $True
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.0.0.0/12 -PassThru
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.111.0.0/16 -PassThru
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.50.0.0/16 -PassThru
@hannesbe
hannesbe / update-netbox.sh
Last active March 10, 2018 01:23
Update Netbox
#!/bin/bash
#
# Update script for Nextbox on CentOS 7
# Releases on https://github.com/digitalocean/netbox/releases
#
# Example usage:
# NETBOX_RELEASE=2.2.6 ./update-netbox.sh
cd /opt
@hannesbe
hannesbe / syno-vpn-keepalive.sh
Last active January 4, 2024 13:53
Script to keep VPN alive on Synology DSM. Checks if IP is pingable and if not: disconnect VPN, reconnect VPN & add routes
# syno-vpn-keepalive.sh
# ---
# Script to keep VPN alive on Synology DSM.
# Checks if IP is pingable and if not:
# disconnect VPN, reconnect VPN & add routes
# ---
# Modify vars:
# - CHECKIP: IP to check to be pingable before reconnecting VPN
# - NAME (Synology VPN name),
# - ID (Synology VPN ID), SSH to NAS & run this to find ID
@hannesbe
hannesbe / connexeon-zendesk-url-builder-config.json
Created May 16, 2017 23:54
JSON config for Connexeon Zendesk URL builder app to generate some useful sidebar links based on ticket, user or organization fields
[
{
"title": "Remote Control {{ticket.requester.firstname}}",
"url": "{{ticket.requester.user_fields.remote_session_link}}"
},
{
"title": "{{ ticket.organization.name }} in Omega",
"url": "http://xtranet.connexeon.com/CRM/Account.aspx?Id={{ticket.organization.organization_fields.omega_account_id}}"
},
{
@hannesbe
hannesbe / Reset-LXSSUserPwd.ps1
Created June 13, 2017 14:23
Resets the password for the default LXSS / WSL bash user
# Resets the password for the default LXSS / WSL bash user
$lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsername
lxrun /setdefaultuser root
bash -c "passwd $lxssUsername"
lxrun /setdefaultuser $lxssUsername
@hannesbe
hannesbe / Install.md
Created June 24, 2017 20:12 — forked from zhiephie/Install.md
Installing nginx, php7-fpm with opcache, memcached, phpredis and xdebug extension on Centos 7

run ./setup.sh

Install Nginx

# yum repository  
$ vim /etc/yum.repos.d/nginx.repo
  [nginx]
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/7/$basearch/
 gpgcheck=0