Skip to content

Instantly share code, notes, and snippets.

View haf's full-sized avatar
💹
currently succeeding...

Henrik Feldt haf

💹
currently succeeding...
View GitHub Profile
Hi,
I'm trying to make Hiera look at nginx::params::varname, where 'varname' is the name of the variable that I request. Example:
class nginx::params {
$varname = 456
}
define site($varname = hiera('varname')) {
file { $varname:
@haf
haf / gist:4745878
Created February 9, 2013 16:21
OpenSSL authentication tokens
This is from the client's perspective.
$ openssl genrsa 2048 >client.key
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA24PnkIZYg/k6lLbNZl5XIxNl8KEsJTUX7h9B2P+o5LjB6e1O
ozVwsPFwXjCJP3WN8KwBQhvpxH4ZCK9H0LyT+NXBPCsydBgY2VfqKK3wQONRKUaE
QkSlV/gA0ciWa/jXD9FDbc3onrlqNTmtjGiMOkXzSJDPz67tEDx+sZQ/+zcEO9tV
PSioq6tZwMHx3EfBratA9W148OZRLOS1AFmcRSSJzsgj/MmOTxrGjfNE2dKMvul4
usjWf8Of+GEpEqW6+SrKZ3ivhP/jx+q1v8BppbhDYag6I+YTwEu4feXJEgM4z83e
05DJvh3hUDgzv7KDMqCp/h3m8f3TolcgvNoxfQIDAQABAoIBAQCg8VrsObPYPvjW
ZBjAf1a/3s8U1/Z36S98ZOpwYTHBUDzMeDL5sorHEJ3kUQ2vu06wMExT3gdNC27r
@haf
haf / gist:4729995
Created February 7, 2013 09:58
My .vimrc
" http://tedlogan.com/techblog3.html
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
$ brew doctor
Warning: /Library/Frameworks/Mono.framework detected
This can be picked up by CMake's build system and likely cause the build to
fail. You may need to move this file out of the way to compile CMake.
Error: Failed to import: cadubi
Error: Failed to import: cantera
Error: Failed to import: docbook2x
Error: Failed to import: gdal
Error: Failed to import: innotop
Error: Failed to import: intltool
@haf
haf / gist:4423968
Last active December 10, 2015 10:49
A pre-draft, happy-new-year, proposal for Inconsistency Roboustness 2014
Inconsistency Roboustness in Software Systems of the Future
It is a known fundamental problem to the people who do programming
for a living, that languages do not match the nature of the universe in which
those languages compute. Computer languages are based a rather romantic notion
of sequential processing that is not in line with how the real world operates;
the real world operates in a continuoum of space-time with multiple concurrent
threads of reality always ongoing, being acted upon by actors.
As such we must strive to model our information systems and programming
@haf
haf / Topshelf.FSharp.fs
Last active October 11, 2017 13:23
Configure TopShelf in F#
namespace Topshelf
[<AutoOpen>]
module Topshelf =
open System
open Topshelf.HostConfigurators
open Topshelf.Runtime
let configureTopShelf f =
@haf
haf / gist:4160744
Created November 28, 2012 12:06
NLog.config - Desktop App
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
throwExceptions="false">
<variable name="appName" value="MyApp" />
<variable name="defaultLayout"
value="${longdate}|${level:uppercase=true}|${logger}|${message}${onexception:${newline}${exception:format=ToString}}" />
@haf
haf / gist:3960824
Created October 26, 2012 19:14
Colourize ruby gem output Windows

Getting Colourised output from Vagrant/Puppet on Windows

Follow this guide FTW. It has nothing to do with win32console despite what the puppet issue tracker says.

cd C:\dev\ansi\x64
.\ansicon.exe -i
@haf
haf / Error text
Created October 26, 2012 15:08
Puppet Error Win8
$ puppet help module
Failed to load feature test for root: uninitialized constant Windows::Synchronize
Error: Could not intialize global default settings: string contains null byte
using System;
namespace Messages
{
public interface FoundFile
{
Uri Location { get; }
}
public class FoundImpl
: FoundFile