This file contains 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
function Validate<T extends { new(...args: any[]): {} }>(constructor: T) { | |
return class extends constructor { | |
errors: string[] | |
constructor(...items: any[]) { | |
super(...items) | |
this.errors = [] | |
for (const x in this) { | |
if (this[x] == undefined) { | |
this.errors.push(`property '${x}' was undefined on class '${constructor.name}'`) |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<meta property="og:image" content="" /> | |
<meta property="og:title" content="Image Viewer" /> | |
<meta property="og:description" content="" /> |
This file contains 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
import socket | |
# https://93.184.216.34/ # example.com | |
# http://52.239.152.74/tor-blobs/tor.txt # http://torpy.blob.core.windows.net/tor-blobs/tor.txt | |
# # example.com | |
# ip_address = "93.184.216.34" | |
# port = 80 | |
# host = "example.com" | |
# path = "/" |
This file contains 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
using System; | |
namespace ConsoleApp1 | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
var stringData = "hello Steve"; | |
var dangerousSpan = stringData.AsSpan(); |