Skip to content

Instantly share code, notes, and snippets.

View DrSpeedy's full-sized avatar

Brian Wilson DrSpeedy

View GitHub Profile
@DrSpeedy
DrSpeedy / Example_LEnglish_Plugin.cpp
Last active September 24, 2023 17:42
Datarazer Sample Language Pack Plugin (3 files)
View Example_LEnglish_Plugin.cpp
// Thetadyn Datarazer Copyright (c) 2023 Thetadyn LLC, All Rights Reserved.
// Sample Datarazer language pack plugin
#include "api/Plugin.h"
#include "util/Logger.hpp"
#include "util/Registry.hpp"
#include "locale/Locale.h"
#include "my_plugin/LEnglish.h"
using namespace api;
View hddqc_sample_settings.ini
; HDDQC Sample Settings (Found @ /etc/hddqc/settings.ini)
[packing]
tech_name = BRIAN
form_factor = 3.5
interface_type = SATA_HDD
box_uid = BOX_12345678
; General Settings
[general]
; Determines weather drives will be mapped or not
@DrSpeedy
DrSpeedy / main.cpp
Last active January 22, 2023 23:57
FTXUI Render Thread Example
View main.cpp
// This code is from the Datarazer project. You may find more info here: https://wiltech.org/datarazer
// This code also to be used as an example for threaded rendering with FXTUI: https://github.com/ArthurSonzogni/FTXUI
int main() {
// ...
Element current_render = text("Loading application...");
// Initialize renderer
std::mutex render_mtx;
std::mutex event_mtx;
@DrSpeedy
DrSpeedy / 9.SpeedyRunning.lua
Last active August 1, 2022 00:15
Better Super Run v2 GTAV - Stand API
View 9.SpeedyRunning.lua
-- Discord: DrSpeedy#1852
-- https://github.com/DrSpeedy
require 'lib/natives-1627063482'
local menu_player_sr = menu.my_root()
local srun_enabled = false
local keys = {}
keys['RB'] = 183
local sr_speed_limit = 120
@DrSpeedy
DrSpeedy / superrun.lua
Last active July 30, 2022 13:16
GTAV: Stand Menu Better Super Run
View superrun.lua
-- DrSpeedy#1852
require 'lib/natives-1627063482'
local srun_enabled = false
local keys = {}
keys['RB'] = 183
menu.toggle(menu.my_root(), 'Super Run', {'srun_enabled'}, '', function(toggle)
srun_enabled = toggle
local is_super_running = false
@DrSpeedy
DrSpeedy / unifi-test.cmd
Created May 17, 2021 12:29
Automated Iperf3 Testing For Unifi APs
View unifi-test.cmd
@echo off
set ui_ctrlr_count=1
set iperf_server_ip="10.42.0.1"
set iperf_server_port=5201
set iperf_server_threads=1
set iperf_server_window_size=64k
for /L %%A in (1,1,%ui_ctrlr_count%) do (
View FreeBSD PfSense IPMI Manual Fan Control
#!/bin/local/bash
# cfan.sh
# Manaual control over fans in PfSense (FreeBSD) on a Dell PowerEdge R210 ii system
# Original script: https://www.garron.me/en/bits/specify-editor-crontab-file.html
# Install:
# sudo pkg install bash && sudo pkg install ipmitool
# Add ipmi_load="YES" to /boot/loader.conf
# Add this script to /usr/bin/
# Add * * * * * /usr/local/bin/bash /usr/bin/cfan.sh to cron file with sudo crontab -e
# Reboot
View bolt.zsh-theme
if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="yellow"; fi
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
PROMPT='
[ %{$fg_bold[orange]%}%n%{$reset_color%}@%{$reset_color%}%{$fg_bold[red]%}%m%{$reset_color%} ]:%{${fg_bold[green]}%}%~%{$reset_color%}$(git_prompt_info)
%{${fg[$CARETCOLOR]}%}➜ %{${reset_color}%}'
RPS1='${return_code} %D - %*'
View bash_cheat_sheet.md

BASH CHEAT SHEET

Text processing

# Read file without empty lines and new line comments with grep
grep -v '^$\|^\s*\#' /path/to/file.txt
# Read file without empty lines, or any comments even on shared lines
@DrSpeedy
DrSpeedy / .zshrc
Last active April 21, 2018 10:24
Automatically change working directories in NeoVim via the terminal
View .zshrc
# This function calls the script below when loaded by
# the shell inside of neovim. It must be placed somewhere in
# your default shell's rc file e.g. ~/.zshrc
neovim_autocd() {
[[ $NVIM_LISTEN_ADDRESS ]] && neovim-autocd.py
}
chpwd_functions+=( neovim_autocd )