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
; HEADER_BLOCK_START | |
; BambuStudio 01.07.04.52 | |
; model printing time: 7m 41s; total estimated time: 13m 28s | |
; total layer number: 10 | |
; model label id: 775 | |
; HEADER_BLOCK_END | |
; CONFIG_BLOCK_START | |
; accel_to_decel_enable = 0 | |
; accel_to_decel_factor = 50% |
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 cryptography.fernet import Fernet | |
import base64, hashlib | |
def gen_fernet_key(passcode) -> bytes: # Modified from https://stackoverflow.com/a/72758959/2246411 | |
hlib = hashlib.md5() | |
hlib.update(bytes(passcode, 'utf-8')) | |
return base64.urlsafe_b64encode(hlib.hexdigest().encode('latin-1')) | |
def encrypt_file(target_file, fernet): # https://www.geeksforgeeks.org/encrypt-and-decrypt-files-using-python/ | |
with open(target_file, 'rb') as file: |
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
# This is just an example for the Get Hosts endpoint | |
# docs: https://www.namecheap.com/support/api/methods/domains-dns/get-hosts/ | |
function GetNamecheapTarget | |
{ | |
param | |
( | |
[string]$username, | |
[string]$apiKey, | |
[string]$domain, |
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 Newtonsoft.Json; | |
//Add your filepath & ocr.space key below | |
string ocr = await DoOCR("screenshot.jpg", "OCR.SPACE API KEY"); | |
Console.WriteLine(ocr); | |
static async Task<string> DoOCR(string fileName, string apikey) | |
{ | |
string resp = null; | |
try |
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 System; | |
using System.Runtime.InteropServices; | |
//Usage: VSToLine.exe [full path to file] [line number] (eg VSToLine.exe fullPathToFile.cs 10) | |
//Original source: https://newbedev.com/open-a-file-in-visual-studio-at-a-specific-line-number | |
//Needed references: | |
// https://www.nuget.org/packages/envdte/17.2.32505.113 | |
// https://www.nuget.org/packages/envdte80/17.2.32505.113 | |
// https://www.nuget.org/packages/stdole/17.2.32505.113 |
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 System.Collections.Generic; | |
namespace SpreadExample | |
{ | |
public class SpreadExample | |
{ | |
//Normally, this would take more lines, like: | |
/* | |
public List<string> InsertList(List<string> secondList) | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>String#includes vs. String#indexOf vs. RegExp</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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 RedditSharp; | |
using RedditSharp.Things; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; |
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 System; | |
using System.IO; | |
using System.Net; | |
using System.Runtime.InteropServices; | |
using Microsoft.Win32; | |
using Newtonsoft.Json.Linq; | |
namespace SubredditLockscreen | |
{ | |
class Program |
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 System; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using Microsoft.Win32; | |
namespace LockScreen | |
{ | |
/* ==================================================== | |
* |
NewerOlder