Skip to content

Instantly share code, notes, and snippets.

Mikael Elkiær MikaelElkiaer

  • Aalborg, Denmark
Block or report user

Report or block MikaelElkiaer

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
MikaelElkiaer / DataContractUrlEncodedSerializer.cs
Last active Aug 7, 2019
Custom UrlEncodedSerializer that utilizes DataContract and DataMember attributes
View DataContractUrlEncodedSerializer.cs
public class DataContractUrlEncodedSerializer : ISerializer
/// <summary>
/// Serializes the specified object utilizing DataContract and DataMembers if present.
/// </summary>
/// <param name="obj">The object.</param>
public string Serialize(object obj)
if (obj == null)
return null;
MikaelElkiaer / hypervisor.ps1
Created Jun 21, 2019
Turning Hypervisor (for Docker) off/on
View hypervisor.ps1
# Run from elevated prompt (admin privileges)
bcdedit /set hypervisorlaunchtype off
# Run from elevated prompt (admin privileges)
bcdedit /set hypervisorlaunchtype auto
MikaelElkiaer /
Created Apr 4, 2019
Certbot wildcard certificate
sudo certbot certonly -d -d * -m XXX --agree-tos --manual --preferred-challenge dns
MikaelElkiaer / random_chars.ps1
Created Mar 11, 2019
Generate random letter combination
View random_chars.ps1
-join ((65..90) + (97..122) | Get-Random -Count 20 | % {[char]$_})
View git_prune_branches.ps1
git remote prune origin ; git branch -vv | ForEach-Object { if($_ -match "^[\s\*]\s(.*)\s+\w{7}.*(?:gone).*$") { git branch -D $Matches[1] } }
View gist:ec1b38e98a2d6fcf156d5410b41fae37
> node
> 0 > null
> 0 < null
> 0 == null
> 0 >= null
> 0 <= null
View gist:70759fd970dd2dd9eea808b0e379f94b
cd /dev
mkdir net
cd net
mknod tun c 10 200
chmod 666 tun
// Stolen from SO:
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
View Click
while true; do xdotool click 1 && sleep 0.06; done
You can’t perform that action at this time.