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
main() { | |
# Use colors, but only if connected to a terminal, and that terminal | |
# supports them. | |
if which tput >/dev/null 2>&1; then | |
ncolors=$(tput colors) | |
fi | |
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
YELLOW="$(tput setaf 3)" |
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/sh | |
# Usage $0 <PCI device>, ex: 9:00.0 | |
INTX=$(( 0x400 )) | |
ORIG=$(( 0x$(setpci -s $1 4.w) )) | |
if [ $(( $INTX & $ORIG )) -ne 0 ]; then | |
echo "INTx disable supported and enabled on $1" | |
exit 0 | |
fi |
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 | |
echo "killing all unit process" | |
process=$(ps aux | grep "Unity" | grep -v grep | awk '{print $2}') | |
for p in $process | |
do | |
kill -9 $p | |
done | |
echo "removing locks" |
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 | |
#Make sure we’re running with root permissions. | |
if [ `whoami` != root ]; then | |
echo Please run this script using sudo | |
echo Just type “sudo !!” | |
exit | |
fi | |
#Check for 64-bit arch | |
if [uname -m != x86_64]; then |
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/sh | |
# A word about this shell script: | |
# | |
# It must work everywhere, including on systems that lack | |
# a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, | |
# and potentially have either a posix shell or bourne | |
# shell living at /bin/sh. | |
# | |
# See this helpful document on writing portable shell scripts: |
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 bash | |
nvidia-settings -q GpuCoreTemp | grep -o '[1-9]*' |
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 | |
configfile=/etc/vfio-pci0.cfg | |
vfiobind() { | |
dev="$1" | |
vendor=$(cat /sys/bus/pci/devices/$dev/vendor) | |
device=$(cat /sys/bus/pci/devices/$dev/device) | |
if [ -e /sys/bus/pci/devices/$dev/driver ]; then | |
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind |
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 bash | |
sudo nice tar czf /media/bender/STOREJET/system_backup.tar.gz --exclude=/home \ | |
--exclude=/media --exclude=/dev \ | |
--exclude=/mnt --exclude=/sys \ | |
--exclude=/run --exclude=/proc / |
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
Ubuntu Forums | |
HOWTO: Easily modify dependencies of a .deb file | |
Printable View | |
Show 75 post(s) from this thread on one page | |
Page 1 of 3123NextLastLast | |
December 10th, 2007Loevborg | |
HOWTO: Easily modify dependencies of a .deb file | |
Save the following script as "videbcontrol", | |
Code: |
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 | |
/opt/TurboVNC/bin/vncserver -3dwm -geometry 1280x720 |