Skip to content

Instantly share code, notes, and snippets.

Henning Kristensen hngkr

  • Aarhus, Denmark
Block or report user

Report or block hngkr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@devhero
devhero / envcontext.py
Last active Feb 12, 2019 — forked from sidprak/env-context.py
A Python context manager for setting/unsetting environment variables
View envcontext.py
"""
Context manager for environment variables
Usage:
os.environ['MYVAR'] = 'oldvalue'
with EnvironmentContex(MYVAR='myvalue', MYVAR2='myvalue2'):
print os.getenv('MYVAR') # Should print myvalue.
print os.getenv('MYVAR2') # Should print myvalue2.
@enryold
enryold / storage-efs-mountfilesystem.config
Created Jan 16, 2017
EFS mount file system script for Elastic Beanstalk .ebconfig
View storage-efs-mountfilesystem.config
#
# Replace FILESYSTEM-ID-HERE and REGION-ID-HERE
#
option_settings:
- option_name: EFS_VOLUME_ID
value: FILESYSTEM-ID-HERE
- option_name: EFS_REGION
value: REGION-ID-HERE
@RafPe
RafPe / vyos_sample_site-2-site_vpn.sh
Created Jun 5, 2016
Vyos sample site-to-site vpn configuration
View vyos_sample_site-2-site_vpn.sh
# Virtual Tunnel Interface
# 172.196.17.188 - 172.196.17.191
set interfaces vti vti0 address 172.196.17.190/30
set interfaces vti vti0 description 'Virtual tunnel interface for VPN tunnel'
# Phase 2
set vpn ipsec esp-group ESP-Default compression 'disable'
set vpn ipsec esp-group ESP-Default lifetime '3600'
set vpn ipsec esp-group ESP-Default mode 'tunnel'
set vpn ipsec esp-group ESP-Default pfs 'dh-group16'
@joefitzgerald
joefitzgerald / win-updates.ps1
Created Dec 31, 2013
Install All Windows Updates, Rebooting As Many Times As Required
View win-updates.ps1
param($global:RestartRequired=0,
$global:MoreUpdates=0,
$global:MaxCycles=10)
function Check-ContinueRestartOrEnd() {
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
$RegistryEntry = "InstallWindowsUpdates"
switch ($global:RestartRequired) {
0 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
You can’t perform that action at this time.