- Type keywords are also constructors.
Discover gists
Moved to git repository: https://github.com/aliesbelik/load-testing-toolkit
Tools to benchmark & load-test your code or services
- apachebench (ab) - Standalone apachebench (ab), Apache HTTP server benchmarking tool.
C
- httperf - A tool for measuring web server performance.
C
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
$(document).ready(function(){ | |
setTimeout(function() { | |
var iframe = document.getElementsByTagName('iframe')[0], | |
iframeDoc = iframe.contentWindow.document; | |
var otherhead = iframeDoc.getElementsByTagName("head")[0]; | |
var css = document.createElement("link"); | |
css.type = "text/css"; | |
css.rel = "stylesheet"; | |
css.href = "/SiteElements/Stylesheets/twitter-widget.css"; |
This guide shows how to enable dev mode for the Discord desktop application running on Windows (as of February 2022).
This can be used to view beta experiments to try features currently in development that are included but hidden by default in Discord release builds.
This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.
npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
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
USERNAME: username | |
PASSWORD: password | |
SERVER:server_address | |
REMOTE_FILE: The_path_to_the_remote_file_on_the_FTP_server | |
LOCAL_PATH: The_local_directory_where_the_downloaded_file_should_be_stored |
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 subprocess | |
import re | |
def get_wifi_passwords(): | |
try: | |
# Run the command to get saved WiFi profiles | |
result = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output=True, text=True, check=True) | |
# Extract profile names |
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 requests | |
import urllib | |
def download_url(file_url): | |
print("downloading: ",file_url) | |
# find "/" then assume that all the rest of the charaters after that represents the filename | |
# if url is www.test.com/abc/xyz/filename.jpg, the file name will be filename.jpg | |
file_name_start_pos = file_url.rfind("/") + 1 | |
file_name = file_url[file_name_start_pos:] | |
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 datetime import datetime | |
import urllib.request | |
import base64 | |
import json | |
import time | |
import os | |
webui_server_url = 'http://127.0.0.1:7860' | |
out_dir = 'api_out' |
NewerOlder