Skip to content

Instantly share code, notes, and snippets.

View brootware's full-sized avatar
🎯
Focusing

Oaker Min brootware

🎯
Focusing
View GitHub Profile
$ANSIBLE_VAULT;1.1;AES256
63333535376164353838646662643761373737383664383834363430363662323561313262353662
6539376130313833646562376561666230336462303363330a323065646330613263396166336131
36636239336431313764303933663035636637346463316139343737356239363863363330373965
6161336463323362350a633831616634613234376133336633393234333961663132303737383738
3263

https://www.elevenforum.com/t/automatically-lock-computer-after-inactivity-in-windows-11.4774/

  • Open Local Security Policy (secpol.msc).
  • Double click/tap on Local Policies in the left pane to expand, and click/tap on Security Options to open it. (see screenshot below)

Automatically_lock_computer_after_inactivity_secpol-1.png

  • In the right pane of Security Options, double click/tap on the Interactive logon: Machine inactivity limit policy to open its properties. (see screenshot above)
  • Enter a number between 0 to 599940 for how many seconds of inactivity you want to automatically lock computer after, and click/tap on OK. (see screenshot below)
  • The default is 0 (zero) seconds to not automatically lock the computer.
@brootware
brootware / for_loop_reverse_list.py
Last active December 12, 2023 03:33
Cheat Sheet
sample_list = [45, 67, 87, 23, 5, 32, 60]
# Your code below
new_list = []
for i in range(len(sample_list)-1, -1, -1):
new_list.append(sample_list[i])
print(new_list)

To enable adding custom search engines in firefox.

In firefox

URL bar --> 
about:config --> 
browser.urlbar.update2.engineAliasRefresh --> 
click on add button on the right
@brootware
brootware / Vagrant_setup.md
Last active August 21, 2023 12:01
Vagrant +Windows + WSL2 + Hyper-v

Vagrant With Windows, WSL2 and Hyper-V

To say getting this configuration working is a pain in the ass is an understatement. However, once it is working correctly you gain access to tools like Ansible and full performance VMs inside Windows. This guide covers the steps I followed to get things working correctly with this configuration. It is possible that something may not work for you however I have been able to reproduce this success on two Windows 11 Pro machines and expect this to work for others.

This guide assumes basic knowledge of Windows and Linux systems and how Vagrant operates. Due to the difficulty of setting this up you may need to do some additional troubleshooting

Requirements

  • Windows Professional - Hyper-V can only be installed on Windows Professional systems or higher
  • WSL2 - Due to the massive differences between WSL1 and WSL2 this guide will only cover support for WSL2
  • CPU Virtualization - While the vast majority of modern CPUs support virtualization you may need to enable it in
function durl() {
read proto server path <<<$(echo ${1//// })
DOC=/${path// //}
HOST=${server//:*}
PORT=${server//*:}
[[ x"${HOST}" == x"${PORT}" ]] && PORT=80
exec 3<>/dev/tcp/${HOST}/$PORT
echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
(while read line; do
param (
[string]$Domain = $(Throw "Error: No domain name argument provided. Usage: Provide a domain name as an argument.")
)
$DOMAIN = $Domain
# Create root CA & Private key
$CreateRootCA = "openssl req -x509 -sha256 -days 356 -nodes -newkey rsa:2048 -subj `"/CN=$DOMAIN/C=US/L=San Fransisco`" -keyout rootCA.key -out rootCA.crt"
Invoke-Expression $CreateRootCA
import socket
import sys
import ipaddress
import subprocess
banner = r"""
__ __.__ _________ .__ .___
/ \ / \__| ____ \_ ___ \|__| __| _/______
\ \/\/ / |/ \ / \ \/| |/ __ |\_ __ \
\ /| | | \ \ \___| / /_/ | | | \/

You can use gtredactkit as an API. To do so:

from gtredactkit import runner
data = """this is my IP: 102.23.5.1
My router is : 10.10.10.1
71.159.188.33
81.141.167.45
165.65.59.139
64.248.67.225
import math
data="""
Hello World, hi!
"""
# Words per minute
WPM = 75
# 3