Skip to content

Instantly share code, notes, and snippets.

@Krizzzn
Krizzzn / sid.js
Last active May 24, 2024 09:57 — forked from vesse/sid.coffee
Convert binary buffer object SID to string
/*
# Convert binary encoded object SID to a string
# (eg. S-1-5-21-1004336348-1177238915-682003330-512)
#
# SID format: https://technet.microsoft.com/en-us/library/cc962011.aspx
#
# ldapjs `searchEntry` has attribute `raw` that holds the raw
# values, including the `objectSid` buffer when one exists. Pass that
# buffer to get the string representation that can then be easily
# used in LDAP search filters, for example.
@Krizzzn
Krizzzn / gist:7483266
Last active December 28, 2015 09:59 — forked from leggetter/gist:769688
private string GetDocumentContents(System.Web.HttpRequestBase Request){
using (Stream receiveStream = Request.InputStream)
{
using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
return readStream.ReadToEnd();
}
}
#!/bin/sh
#aktualisiert DNS-Einträge bei HostEurope
#HostEurope-Zugangsdaten
KUNDENNR=xxx
PASSWORD=xxx
#Host-ID des eigentlichen Eintrages
HOSTID=xxx
#externe IP bestimmen und dann vergleichen