View noVNCCopyPasteProxmox.user.js
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
// ==UserScript== | |
// @name noVNC Paste for Proxmox | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Pastes text into a noVNC window (for use with Proxmox specifically) | |
// @author Chester Enright | |
// @match https://* | |
// @include /^.*novnc.*/ | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @grant none |
View logoutAllUsers.sh
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
#!/bin/sh | |
# REQUIRES 'jq' TO BE INSTALLED (`brew install jq`) | |
# Combines two aws-cli cognito commands, `list-users` and `admin-user-global-sign-out`. | |
# * aws cognito-idp list-users --region ${REGION} --user-pool-id ${USER_POOL_ID} | |
# * aws cognito-idp admin-user-global-sign-out --region ${REGION} --user-pool-id ${USER_POOL_ID} --username ${USERNAME} | |
# However, the `list-users` command may be paginated. | |
# Used a pagination loop based on `https://stackoverflow.com/a/68809399`. |
View router.js
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
// <Routes> | |
// <Route path="/" element={<RequireAuth><Dashboard /></RequireAuth>}> | |
// <Route path="about" element={<AboutPage />} /> | |
// </Routes> | |
import { Auth } from 'aws-amplify' | |
import { Navigate } from 'react-router-dom' | |
const RequireAuth = ({ children }) => { | |
const [loading, setLoading] = React.useState(true) |
View tesmart.yaml
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
kvmd: | |
gpio: | |
drivers: | |
tes: | |
type: tesmart | |
host: 10.10.1.10 | |
port: 5000 | |
scheme: | |
server0_led: | |
driver: tes |
View gist:b813c931689cb84634afe895e27edbf0
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
on run {input, parameters} | |
set dir_name to do shell script "date -u '+%Y%m%dT%H%M%SZ'" | |
do shell script "mkdir -p ~/Desktop/Screenshots/" & dir_name | |
tell application "VMware Fusion" | |
activate | |
# Large | |
# do shell script "screencapture -R1810,180,2130,3600 ~/Desktop/Screenshots/$(date -u '+%Y%m%dT%H%M%SZ').png" |
View hangup.xml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<Hangup /> | |
</Response> |
View 1.js
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
// const obj = { a: undefined, b: 2, c: 0, d: null, e: 0.3, f: "", g: false } | |
Object.fromEntries(Object.entries(obj).filter(([k, v]) => v != null)) | |
// => {b: 2, c: 0, e: 0.3, f: "", g: false} |
View objectmap.js
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
const obj = { foo: 'hello', bar: 'world' } | |
const updatedObj = Object.fromEntries( | |
Object.entries(obj).map(([key, val]) => [ | |
key, | |
val.toUpperCase(), | |
]), | |
) | |
// {foo: "HELLO", bar: "WORLD"} |
View transposedown.qml
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 QtQuick 2.0 | |
import MuseScore 3.0 | |
MuseScore { | |
menuPath: "Plugins.transposeDown" | |
onRun: { | |
for (var i = 1; i-- > 0;) { | |
cmd("transpose-down"); | |
} | |
Qt.quit(); |
View test.js
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
const assert = require('assert') | |
const mdx = require('@mdx-js/mdx') | |
const text = 'foo' | |
const expected = el => | |
`\n\nconst layoutProps = {\n \n};\nexport default class MDXContent extends React.Component {\n constructor(props) {\n super(props)\n this.layout = null\n }\n render() {\n const { components, ...props } = this.props\n\n return <MDXTag\n name="wrapper"\n \n components={components}><${el}>${text}</${el}>\n </MDXTag>\n }\n}\nMDXContent.isMDXComponent = true` | |
const elements = [ | |
// Unknown HTML Elements |
NewerOlder