Discover gists
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' |
-
CTRL + A
— Move to the beginning of the line -
CTRL + E
— Move to the end of the line -
CTRL + [left arrow]
— Move one word backward (on some systems this is ALT + B) -
CTRL + [right arrow]
— Move one word forward (on some systems this is ALT + F) -
CTRL + U
— (bash) Clear the characters on the line before the current cursor position -
CTRL + U
—(zsh) If you're using the zsh, this will clear the entire line -
CTRL + K
— Clear the characters on the line after the current cursor position -
ESC + [backspace]
— Delete the word in front of the cursor
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
public class Math3d { | |
private static Transform tempChild = null; | |
private static Transform tempParent = null; | |
NewerOlder