This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo | openssl s_client -showcerts -servername some-domain.com -connect some-domain.com:443 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run from elevated prompt (admin privileges) | |
| bcdedit /set hypervisorlaunchtype off | |
| # Run from elevated prompt (admin privileges) | |
| bcdedit /set hypervisorlaunchtype auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| sudo certbot certonly -d foo.bar -d *.foo.bar -m XXX --agree-tos --manual --preferred-challenge dns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -join ((65..90) + (97..122) | Get-Random -Count 20 | % {[char]$_}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git remote prune origin ; git branch -vv | ForEach-Object { if($_ -match "^[\s\*]\s(.*)\s+\w{7}.*(?:gone).*$") { git branch -D $Matches[1] } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > node | |
| > 0 > null | |
| false | |
| > 0 < null | |
| false | |
| > 0 == null | |
| false | |
| > 0 >= null | |
| true | |
| > 0 <= null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pkill -USR1 polybar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /dev | |
| mkdir net | |
| cd net | |
| mknod tun c 10 200 | |
| chmod 666 tun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Stolen from SO: http://stackoverflow.com/a/10099325/3376155 | |
| // 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"); |