Skip to content

Instantly share code, notes, and snippets.

import shutil
import sys
import glob
import os
# Reorganizing chia plot on disk to free disk
# example python diskweap.py /media/plot1
# will check moving all finish plot from disk6 to 1, 5 to 1, 4 to 1, 3 to 1, 2 to 1 then step to disk 2 => 6 to 2...
mount_path = sys.argv[1]
@troglodyne
troglodyne / dark_orb.css
Last active October 12, 2023 17:27
WHM Dark mode CSS for use in Stylus plugin
/*
You may need to replace the line below with something like:
@-moz-document domain("whm.my.domain.name") if using the whm proxy subdomain
*/
@-moz-document regexp("^http[s]?://[a-zA-Z0-9._-]+:208[67]/.*") {
#topFrameWrapper > div {
background-color: #1d1d1d;
color: white;
}
#pageContainer {
@zetas
zetas / default.json
Created June 13, 2018 06:00
iTerm2 Byobu Keybind Profile.
{
"Ansi 5 Color" : {
"Green Component" : 0.4117647111415863,
"Blue Component" : 0.78823530673980713,
"Red Component" : 0.55686277151107788
},
"Working Directory" : "\/Users\/david",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0.729411780834198,
@dorkmatt
dorkmatt / netbox_optics_audit.py
Last active June 28, 2022 11:32
Netbox Juniper/Arista optics audit
#!/usr/bin/env python
#
# Fetch list of Juniper/Arista devices via Netbox, query optics info via Netconf, write to CSV file
#
# Written at 34c4 in Leipzig, Germany
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@maldonadojuan
maldonadojuan / netboxInstall.sh
Created November 15, 2017 15:42
NetBoxInstallonUbuntu1604
###NetBox Install###
#update repos
sudo apt-get update
#install postgresql
sudo apt-get install -y postgresql libpq-dev
#go into sql with user postgres
sudo -u postgres psql
<?php
namespace app\extensions\data\behavior;
use nzedb\Users;
use lithium\aop\Filters;
class Vip extends \li3_behaviors\data\model\Behavior
{
@hannesbe
hannesbe / update-netbox.sh
Last active March 10, 2018 01:23
Update Netbox
#!/bin/bash
#
# Update script for Nextbox on CentOS 7
# Releases on https://github.com/digitalocean/netbox/releases
#
# Example usage:
# NETBOX_RELEASE=2.2.6 ./update-netbox.sh
cd /opt
#!/bin/bash
#
# This script is used to setup netbox on a server running CentOS.
# Details at http://www.opentechshed.com/deploying-netbox-digital-ocean
#
### User Modifiable Variables ###
LOGFILE="/tmp/netbox-install.log"
PGCONF="/var/lib/pgsql/10/data/pg_hba.conf"
DBPASS=`date +%s | sha256sum | base64 | head -c 32`
NBADMIN='admin'
@dsieborger
dsieborger / download-zd-config.sh
Created April 9, 2015 18:21
Download binary config file from Ruckus ZoneDirector
#!/bin/sh
# Download the binary config file from a Ruckus ZoneDirector.
#
# Tested with 9.8.2 on a ZD5000. May well need to be adjusted for other
# versions.
USERNAME=xxx
PASSWORD=xxx
ZDURL=https://zonedirector.example
COOKIES=cookies.txt # will be overwritten if it exists
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)