To do this we will use the linux command grep.
Please jump to How to use linux command under Windows? for more information.
| git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
| git push --force |
| 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:] | |
| 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 |
| 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 |
| # selenium for web driving | |
| import selenium | |
| from selenium import webdriver | |
| # time for pausing between navigation | |
| import time | |
| # Datetime for recording time of submission | |
| import datetime |
To do this we will use the linux command grep.
Please jump to How to use linux command under Windows? for more information.
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |