Skip to content

Instantly share code, notes, and snippets.

@mikepruett3
mikepruett3 / shell-setup.ps1
Last active March 28, 2024 21:52
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 21:52
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@xdavidhu
xdavidhu / converter.sh
Last active March 28, 2024 21:49
Converter.sh, a bash script to convert domain lists to resolved IP lists without duplicates
#!/bin/bash
# Converter.sh by @xdavidhu
# This is a script inspired by the Bug Hunter's Methodology 3 by @Jhaddix
# With this script, you can convert domain lists to resolved IP lists without duplicates.
# Usage: ./converter.sh [domain-list-file] [output-file]
echo -e "[+] Converter.sh by @xdavidhu\n"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "[!] Usage: ./converter.sh [domain-list-file] [output-file]"
exit 1
@dadodasyra
dadodasyra / PM5_World_converter.php
Created November 5, 2023 19:24
Convert world with plugin code to leveldb (can be used with sort of a TestCommand) it freezes the server until the end of the conversion and automatically detect the base format.
<?php
$originalPath = "/root/servers/miscs/converting/lobby";
$backupPath = "/root/servers/miscs/converting/backup"; //this will create a folder under this one with the name of the world
$providerManager = new WorldProviderManager();
$writableFormats = array_filter($providerManager->getAvailableProviders(), fn(WorldProviderManagerEntry $class) => $class instanceof WritableWorldProviderManagerEntry);
$requiredOpts = [
"world" => "path to the input world for conversion",
"backup" => "path to back up the original files",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device, initial-scale=1.0">
<title>Rose🌹</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
@minimalefforttech
minimalefforttech / async_callable.py
Last active March 28, 2024 21:46
A simple example of running code on separate threads
# Copyright (C) 2024 Alex Telford
# http://minimaleffort.tech
# This work is licensed under the Creative Commons Attribution 4.0 International License.
# To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons,
# PO Box 1866, Mountain View, CA 94042, USA.
# Distributed without any warranty or liability, use at your own risk
# This is an example of deffering code using Qt event loops
try:
from PySide6 import QtCore, QtWidgets
@miguelmota
miguelmota / README.md
Last active March 28, 2024 21:46
Arch linux secure machine

Create new user

sudo useradd -m -s /bin/bash alice
sudo passwd alice

Add user to wheel (sudo) group

@phil-blain
phil-blain / .gitattributes
Last active March 28, 2024 21:37
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown
@0xjac
0xjac / private_fork.md
Last active March 28, 2024 21:36
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git