#!/usr/bin/env bash
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
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
| """Script to send string to keyboard | |
| # INSTALL | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install pyautogui | |
| # USAGE | |
| 1. Change `data_to_send` | |
| 2. Hover mouse to place where you want to send keystrokes in (Browser/RDP) |
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
| #!/bin/bash | |
| # Usage: ./lm-symlink.sh <target_directory> | |
| # Example: ./lm-symlink.sh ~/.cache/lm-studio/models | |
| # Check if the target directory is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <target_directory>" | |
| echo " <target_directory> is the path to the LM Studio models folder." | |
| exit 1 | |
| fi |
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
| # 1. python file | |
| sudo mkdir -p /opt/cred | |
| cat <<ETO > /opt/cred/creds.py | |
| import argparse | |
| import sys | |
| import yaml | |
| parser = argparse.ArgumentParser(description='find creds or execute credential') | |
| parser.add_argument('--mode', help='mode to run') | |
| parser.add_argument('--name', help='name to find') |
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
| """ | |
| simple example showing sqlalchemy Adjacency List Relationships | |
| https://docs.sqlalchemy.org/en/13/orm/self_referential.html | |
| """ | |
| from sqlalchemy import create_engine, Column, ForeignKey, Integer, String | |
| from sqlalchemy.orm import sessionmaker, relationship, backref | |
| from sqlalchemy.ext.declarative import declarative_base | |
| DB_PATH = 'sqlite:///nodes.sql' |
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
| # list | |
| vboxmanage list vms | |
| vboxmanage list runningvms | |
| # start | |
| VM=cent7_1 | |
| vboxmanage startvm $VM --type headless | |
| # stop | |
| vboxmanage controlvm Ubuntu poweroff soft |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 os | |
| import sys | |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib | |
| from matplotlib import pyplot as plt | |
| import seaborn as sns | |
| from IPython.core.display import display, HTML |
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
| def chunks(l, n): | |
| """Yield successive n-sized chunks from l.""" | |
| for i in range(0, len(l), n): | |
| yield l[i:i + n] | |
| def chunks_iter(l, n): | |
| it = iter(iterable) | |
| while True: | |
| chunk = tuple(itertools.islice(it, n)) | |
| if not chunk: |
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
| #!/usr/bin/env bash | |
| # template for maange script in bash | |
| # provide listing functions / usage.. etc | |
| CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| # START vars | |
| LOG_FILE="$CWD/log.log" | |
| # END vars |
NewerOlder