Runnable version in bl.ocks.org
This file contains 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 python | |
# vim: set fileencoding=utf-8 | |
# | |
# USAGE: | |
# Back up your tmux old config, run the script and redirect stdout to your conf | |
# file. Example: | |
# | |
# $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
# |
This file contains 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
scrollbar, scrollbar *, scrollcorner { | |
-moz-appearance: none !important; | |
--scrollbar-width: 10px; | |
--scrollbar-height: var(--scrollbar-width); | |
} | |
scrollbar, scrollcorner { | |
background: #282828 !important; | |
} | |
scrollbar[orient="vertical"] { |
This file contains 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 | |
#gconftool-2 -s -t string /apps/guake/style/font/palette "#263238:#ec407a:#8bc34a:#ffa726:#2196f3:#9575cd:#00bcd4:#eceff1:#617d8a:#ec407a:#9ccc65:#ffb74d:#42a5f5:#b39ddb:#26c6da:#ffffff" | |
#gconftool-2 -s -t string /apps/guake/style/font/color "#ffffffffffff" | |
#gconftool-2 -s -t string /apps/guake/style/background/color "#263238" | |
dconf write /apps/guake/style/font/palette "'#000000000000:#cccc00000000:#4e4e9a9a0606:#c4c4a0a00000:#34346565a4a4:#757550507b7b:#060698209a9a:#d3d3d7d7cfcf:#555557575353:#efef29292929:#8a8ae2e23434:#fcfce9e94f4f:#72729f9fcfcf:#adad7f7fa8a8:#3434e2e2e2e2:#eeeeeeeeecec:#ffffffffffff:#000000000000'" |
This file contains 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 | |
while getopts ":o:" opt; do | |
case ${opt} in | |
o) output=$OPTARG ;; | |
esac | |
done | |
if [ -z "$output" ]; then | |
echo "Usage: $0 -o output_file" |
This file contains 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
# https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client | |
# https://serverfault.com/a/660106 | |
ip rule add from x.x.x.x table 128 | |
ip route add table 128 to y.y.y.y/y dev ethX | |
ip route add table 128 default via z.z.z.z | |
# Where x.x.x.x is your public IP, y.y.y.y/y should be the subnet | |
# of your public IP address, ethX should be your public Ethernet | |
# interface, and z.z.z.z should be the default gateway. | |
# Note that this hasn't worked for me (using Debian and PrivateInternetAccess) |
This file contains 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
menupopup { | |
--panel-background: var(--arrowpanel-background) !important; | |
--panel-color: var(--arrowpanel-color) !important; | |
--panel-border-color: var(--arrowpanel-border-color) !important; | |
--panel-border-radius: var(--arrowpanel-border-radius) !important; | |
--panel-padding: var(--arrowpanel-padding) !important; | |
} | |
menuseparator { | |
appearance: inherit !important; |
This file contains 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
from pathlib import Path | |
import sys | |
from PySide6.QtCore import QUrl, QObject, Property, Signal, Slot | |
from PySide6.QtWidgets import QApplication | |
from PySide6.QtQml import QmlElement, QQmlApplicationEngine | |
from PySide6.QtCharts import QAbstractSeries | |
QML_IMPORT_NAME = "name.kyzivat.piechart_example" | |
QML_IMPORT_MAJOR_VERSION = 1 |
This file contains 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 | |
#set -x | |
# Shows you the largest objects in your repo's pack file. | |
# Written for osx. | |
# | |
# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
# @author Antony Stubbs | |
# set the internal field separator to line break, so that we can iterate easily over the verify-pack output |
Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:
- You're using legacy disk partitions. The process for LVM is similar and I will describe that in another post.
- The partition you need to resize is the last partition on the disk.
This process will work with either a qcow2
or raw
disk image. For