Skip to content

Instantly share code, notes, and snippets.

View lanoxx's full-sized avatar

Sebastian Geiger lanoxx

  • Vienna, Austria
View GitHub Profile
@euyuil
euyuil / SetupWinRM.ps1
Created October 21, 2016 10:18
WinRM: Enable WinRM and create an HTTPS listener with self-signed certificate.
Param ($DnsName)
$Cert = New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName $DnsName -Verbose
$Password = ConvertTo-SecureString -String $DnsName -Force -AsPlainText -Verbose
Export-Certificate -Cert $Cert -FilePath .\$DnsName.cer -Verbose
Export-PfxCertificate -Cert $Cert -FilePath .\$DnsName.pfx -Password $Password -Verbose
$CertThumbprint = $Cert.Thumbprint
foo: screensaver-gdbus.c foo.c
$(CC) -Wall -Wextra -Wno-unused-parameter $(CFLAGS) -o $@ `pkg-config --cflags --libs glib-2.0 gio-2.0 gio-unix-2.0` $^
%-gdbus.c %-gdbus.h: %-dbus.xml
gdbus-codegen --interface-prefix org.gnome. --generate-c-code $*-gdbus --c-namespace Foo_DBus $<
screensaver-dbus.xml:
gdbus introspect -e -d org.gnome.ScreenSaver -o /org/gnome/ScreenSaver -x > $@
clean: