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
/* | |
cc Redowan Delowar (rednafi.com) | |
+----------------------------------------+ | |
| Load Balancer (8080) | | |
| +----------------------------------+ | | |
| | | | | |
| | Request from Client | | | |
| | | | | |
| +-----------------|----------------+ | |
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
#!/usr/bin/env python3.11 | |
# MIT No Attribution | |
# | |
# Copyright 2023 Ben Kehoe | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
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 Windows.Security.Credentials; | |
using WinRT; | |
namespace CredentialCsWinRtTest { | |
internal class Program { | |
static void Main(string[] args) { | |
Windows.Security.Credentials.WebAccount foo = null /* or somehow get it */; | |
Windows.Security.Credentials.IWebAccount2 webAccount2 = foo.As<IWebAccount2>(); | |
// if webaccount2 is not null . . . | |
webAccount2.SignOutAsync("clientId"); // do something with the async task actually |
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> | |
<head> | |
<title>Hello Page</title> | |
<script src="https://unpkg.com/htmx.org@1.9.2"></script> | |
</head> | |
<body> | |
<h1>Hello</h1> |
If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"
Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:
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
# Download this file with: | |
# curl -L https://gist.githubusercontent.com/dtaivpp/a9b00957aa7d9cfe33e92aff8d50c835/raw/logging_demo.py -o logging_demo.py | |
import logging | |
# | |
# Named loggers | |
# | |
logger = logging.getLogger(__name__) | |
print(logger.name) |