###Tuning
$ netstat -nao | grep 8080 | grep TIME_WAIT | wc -l
To achieve the top most performance you should tune the source server system limits:
net.ipv4.tcp_max_tw_buckets = 65536
###Tuning
$ netstat -nao | grep 8080 | grep TIME_WAIT | wc -l
To achieve the top most performance you should tune the source server system limits:
net.ipv4.tcp_max_tw_buckets = 65536
function validVideoId(id) { | |
var img = new Image(); | |
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg"; | |
img.onload = function () { | |
checkThumbnail(this.width); | |
} | |
} | |
function checkThumbnail(width) { | |
//HACK a mq thumbnail has width of 320. |
${BASE_URL}/sitemap.xml
#!/bin/bash | |
# Fetch wallpaper from the API - https://github.com/TimothyYe/bing-wallpaper | |
api_url="https://bing.biturl.top/?resolution=3840&format=json&index=0&mkt=zh-CN" | |
response=$(curl -s "$api_url") | |
# Parse JSON response | |
start_date=$(echo "$response" | jq -r '.start_date') | |
end_date=$(echo "$response" | jq -r '.end_date') | |
image_url=$(echo "$response" | jq -r '.url') |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
# Converts OpenAI compatible function calling JSON schema to a prompt that instructs the LLM to return | |
# a JSON object that is a choice of a function call conforming to one of the functions or a message reply | |
def convert_schema_to_typescript(schema): | |
if not schema: | |
return 'any' | |
if '$ref' in schema: | |
return schema['$ref'].replace('#/definitions/', '') |