References:
From man page: man apt_preferences
#!/bin/bash | |
# Script Name: check_updates_deb | |
# Author Name: Matt McKinnon | |
# Date: 7th June 2016 | |
# Description: For use on Debian Based Systems | |
# This script will: | |
# Clean up the local apt repository of retrieved packages (apt-get clean) | |
# Resync the package index (apt-get update) | |
# If called with AUTOUPDATE set to yes then updates will be downloaded and applied with no feed back (not recommended) | |
# If called without AUTOUPDATE then packages are downloaded and an email is sent informing which packages are to be updated. |
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface. | |
You can use the user and password that you use for the web interface. | |
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS. | |
You don't need to install it, just extract it or copy the files in "jre" folder. | |
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor. | |
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture. | |
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs. |
References:
From man page: man apt_preferences
import os | |
descriptors = list() | |
def getString(): | |
test_file = "nvidia-smi -q --gpu=0 | tail -23" | |
try: | |
p = os.popen(test_file, 'r') | |
return p.read() |
Derived from: http://www.c0t0d0s0.org/archives/7485-Find-out-in-depth-information-about-a-file-in-ZFS.html
Sometimes you need to acquire in-depth information about a file that isn't exposed by other commands like stat
.
ZFS allows you to do this with zdb
. However there's a confusing problem. If you're just trying to access a file on your root pool that doesn't have any nested datasets, you need use rpool/
instead of just rpool
(assuming "rpool" is the name of your root pool).
Here's 3 examples of acquiring information on /filepath
.
What I had:
What I wanted:
#!/bin/bash | |
# See http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line | |
echo "Checking Xcode CLI tools" | |
# Only run if the tools are not installed yet | |
# To check that try to print the SDK path | |
xcode-select -p &> /dev/null | |
if [ $? -ne 0 ]; then | |
echo "Xcode CLI tools not found. Installing them..." |
sudo -i
and type in your Mac Administrator account password. sudo
gives you root level or administrator level privileges.dsconfigad -show
Press minus + shift + s
and return
to chop/fold long lines!
users: | |
- { username: user1, password: password } | |
- { username: user2, password: password } | |
- { username: user3, password: password } | |
- { username: user4, password: password } |