This file contains hidden or 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
var zlib = require('zlib'); | |
var fs = require('fs'); | |
function decompress(inFilename, outFilename) { | |
var unzip = zlib.createUnzip(); | |
var input = fs.createReadStream(inFilename); | |
var output = fs.createWriteStream(outFilename); | |
input.pipe(unzip).pipe(output); | |
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe" 46783.tif -background white -flatten 46783.jpg |
This file contains hidden or 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
"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe" 46783.tif -background white -alpha remove 46783.jpg |
This file contains hidden or 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
"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe" 94196.png -trim +repage 94196.png |
This file contains hidden or 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
"C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe" convert -quiet -background none -flatten -transparent white 4sgmlogo.png 4sgmlogo.png |
This file contains hidden or 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 filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
git push --force |
This file contains hidden or 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
pip freeze > requirements.txt |
OlderNewer