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
customElements.define('ajax-form', class extends HTMLElement { | |
/** | |
* The class constructor object | |
*/ | |
constructor () { | |
// Always call super first in constructor | |
super(); |
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
customElements.define( | |
"i-frame", | |
class extends HTMLElement { | |
#shadow = this.attachShadow({ mode: "closed" }); | |
constructor() { | |
super(); | |
this.#shadow.innerHTML = ` | |
<slot></slot> | |
<iframe part="frame" srcdoc=""></iframe> |
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
# Might be outdated! Check https://github.com/marketplace/actions/build-docker-and-deploy-to-caprover for the latest version. | |
name: Create and publish Docker image to CapRover | |
# Requires the following Action secrets to be set in your GitHub repo: | |
# - CAPROVER_APP_TOKEN | |
# - CAPROVER_SERVER_URL | |
on: | |
push: |
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
class HTTPSOnlyMiddleware: | |
""" | |
Override request.is_secure() to always return True. | |
Only use if you're **always** serving with HTTPS | |
**and** SECURE_PROXY_SSL_HEADER is not suitable for your setup. | |
""" | |
def __init__(self, get_response): | |
self.get_response = get_response |
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
import { reactive } from '@vue/reactivity' | |
function switchboard(value) { | |
let lookup = {} | |
let current | |
let get = () => current | |
let set = (newValue) => { |
Untitled CSS Library is a CSS library that, so far as I can tell, does not exist.
It offers the following features:
- It renders well out of the box with Vanilla HTML, like a classless CSS library such as pico
- It takes advantage of semantic, lesser used tags such as
nav
,main
andsection
to allow for more elaborate layouts in pure HTML - It offers "High Power" classes that capture high level components in, as much as is possible, a single CSS class
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
from fastapi import FastAPI, Request | |
from fastapi.responses import HTMLResponse | |
from profiler import FastApiProfiler | |
app = FastAPI() | |
import .routes # NOQA | |
PROFILING = True # Put this in Settings when you're ready |
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
query ($owner: String!, $after: String) { | |
user (login: $owner) { | |
sponsorshipsAsMaintainer(first: 100, after: $after, includePrivate: true) { | |
totalCount | |
nodes { | |
sponsorEntity { | |
... on User { | |
login | |
} | |
} |
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
app: | |
nim c app.nim | |
clean: | |
rm app | |
run: | |
./app |
NewerOlder