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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "string", | |
"title": "String Case", | |
"description": "Formatting of a multi-word identifier", | |
"default": "snake", | |
"$comment": "Based on stringcase.org", | |
"oneOf": [ | |
{ | |
"oneOf": [ |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"title": "URL Param Schema", | |
"description": "Schema to be converted to URL parameters", | |
"definitions": { | |
"urlParamSchema": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"properties": { |
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 base64 | |
def data_url(mime_sub_type: str, text: str) -> str: | |
"""Convert text to data URL""" | |
return f"data:text/{mime_sub_type};base64,{base64.b64encode(text.encode()).decode()}" |
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
; Replace "example.com" with your domain name (keep the . at the end) and import the file in your cloudflare dashboard | |
example.com. 1 IN A 185.199.108.153 ; GitHub Pages | |
example.com. 1 IN A 185.199.109.153 ; GitHub Pages | |
example.com. 1 IN A 185.199.110.153 ; GitHub Pages | |
example.com. 1 IN A 185.199.111.153 ; GitHub Pages | |
example.com. 1 IN AAAA 2606:50c0:8000::153 ; GitHub Pages | |
example.com. 1 IN AAAA 2606:50c0:8001::153 ; GitHub Pages | |
example.com. 1 IN AAAA 2606:50c0:8002::153 ; GitHub Pages | |
example.com. 1 IN AAAA 2606:50c0:8003::153 ; GitHub Pages |
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
.bng-app:not([appid="3"]) { | |
display: none; | |
} | |
.container { | |
background: black !important; | |
} | |
.bng-app[appid="3"] { | |
width: 100vw !important; |
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/bash | |
tag="0.25.2" | |
# Identify CPU architecture | |
architecture="$(uname -m)" | |
if [ "$architecture" == "arm64" ] || [ "$architecture" == "aarch64" ]; then | |
build="aarch64" | |
elif [ "$architecture" == "x86_64" ]; then | |
if sysctl -n sysctl.proc_translated > /dev/null 2>&1; then | |
# This is an ARM CPU running in translation mode |
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 { ReadWriteFileCacheManager } from "./FileCacheManager.ts"; | |
/** Cache manager for raw binary files | |
* | |
* @property {string} filePath Path to the file whose contents are to be cached | |
* @property {Promise<Uint8Array>} dataPromise Asynchronous getter for data | |
* @property {Uint8Array} data Synchronous getter for data | |
* @property {Promise<void>} set Asynchronous setter for data | |
* @property {Uint8Array} data Synchronous setter for data | |
*/ |
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/zsh | |
## Generate code with Shell GPT's code role and watch it being written in VSCode | |
aicode() { | |
# Check if input is available from the pipe | |
if [ -t 0 ]; then | |
# If no input from pipe, pass only the prompt to the AI | |
sgpt --code "$@" | codium - | |
else | |
# If input is received from pipe, concatenate it with the provided prompt |
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
git clone https://github.com/seemoo-lab/owl.git /tmp/owl | |
pushd /tmp/owl | |
git submodule update --init | |
git submodule update --remote --merge # see issue #77 on seemoo-lab/owl | |
mkdir build | |
cd build | |
cmake .. | |
make | |
sudo make install | |
popd |
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
from flask import Flask, request, jsonify | |
app = Flask(__name__) | |
@app.route('/for_me/', methods=['GET', 'POST', 'PUT', 'PATCH', 'DELETE']) | |
def index(): | |
print(request.json) | |
response = input('Enter your full response as json:\n') |
NewerOlder