Skip to content

Instantly share code, notes, and snippets.

@i3v
i3v / cdm_fio.sh
Last active May 15, 2024 13:10
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test
@noelbundick
noelbundick / LICENSE
Last active June 14, 2025 02:56
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cimnine
cimnine / 0_README.md
Last active June 20, 2024 03:37
A script to import custom fields from a YAML into Netbox

custom field import script

Usage:

./manage.py shell --plain < import_custom_fields.py

A Note On Boolean Custom Fields

@bmaddy
bmaddy / csd-responder-exec.sh
Last active June 15, 2021 09:18
Connecting to Cisco's AnyConnect SSL VPN on MacOS (bypassing the EOL'd Cisco Secure Desktop)
Moved to https://github.com/bmaddy/csd-vpn/blob/master/csd-responder-exec.sh
@filviu
filviu / migrate.sh
Created May 11, 2017 07:56
migrate proxmox container storage
#!/bin/bash
#
# Filename : migrate
# Description : Migrate Proxmox OpenVZ container from one storage to another
# Author : James Coyle
#
# Version:
# -Date -Author -Description
# 20-11-2013 James Coyle Initial
# 23-11-2015 Patrick Smits Changes to support PVE 4
@SimplGy
SimplGy / renameToHash.sh
Last active July 27, 2023 07:30
Rename files with a hash based on their contents. eg: `abc.jpg` to `3101ace8db9f.jpg`. Useful for detecting duplicates.
#!/bin/bash
# TODO: skip tiny files (so small they couldn't be photos)
# TODO: make sure sym links and other file system oddities are handled
# TODO: look at paralellization for perf boost
#
# Constants
#
CHAR_COUNT=12
BLOCK_COUNT=6
@bbengfort
bbengfort / jsonexplorer.py
Last active June 26, 2024 10:00
Interactive JSON explorer using Python's cmd module
#!/usr/bin/env python
# jsonexplorer
# An interactive interface to explore JSON documents
#
# Author: Benjamin Bengfort <[email protected]>
# Created: Wed Jun 17 12:15:23 2015 -0400
#
# Copyright (C) 2015 Bengfort.com
# Licensed under the OSI Approved MIT License
#