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 | |
# TU/e MetaForum WiFi enabler/disabler | |
# By Chris Mavrakis | |
# | |
# Usage: | |
# sudo mfwifi [enable|disable|setup] | |
# | |
# setup should be run only once, the first time. It asks for TU/e credentials, | |
# does not send them back to me, and creates the appropriate files in /etc/network |
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 "Doing..." | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Primary><Alt>s']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Primary><Alt>a']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Primary><Alt>d']" | |
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Primary><Alt>w']" | |
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 | |
# Power optimization script for the Lenovo Ideapad Z370a. Written by Chris Mavrakis (cmavr8@gmail.com). | |
# Place in /usr/lib/pm-utils/power.d and make executable. | |
case $1 in | |
false) # On AC power! | |
# Intel HD audio power management: |
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 | |
# Little script to examine a PKP OCS user database. Instructions: | |
# 1. Login to OCS and export the users as an xml | |
# 2. Convert the file to CSV using e.g. Stylus studio 2011 XML Enterprise Suite | |
# 3. Change this line: | |
INPUT=users.csv | |
# 4. Run the script | |
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 | |
# Script to automate making and installing C++ code to NETCONF server config, based on a YANG module file (module_name.yang). Created by Chris Mavrakis <sec@cmavrakis.com>, 21-Nov-2011. | |
# The code is messy and does not do ANY checks... so be careful. Inspect it yourself before using it, I will have no responsibility if something bad happens. Info about YANG, YUMA etc can be found here: http://www.netconfcentral.org | |
### Please edit the following two options: | |
### 1. What is the name of your Module? This should be your filename's first part (before the ".yang") | |
MODULENAME=MYMODULE |
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 | |
#This script makes sure nm-applet is always running. | |
echo "Initiating script (`date`)" > /tmp/nm-watchdog | |
while [ 1 == 1 ] | |
do | |
#echo "Checking..." >> /tmp/nm-watchdog | |
tmp=`ps -e |grep nm-applet` | |
if [[ "$tmp" == '' ]] | |
then | |
export DISPLAY=':0.0' |
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 | |
#Map this script to a button (eg F1) to mute your mic while VoIPing | |
currentlevel=`amixer get Capture |grep "Front Left:" | awk '{ print ($5) }'` | |
if [ $currentlevel == '[100%]' ]; then | |
amixer set Capture 0 | |
echo "Mic muted" >> /tmp/mutelog | |
elif [ $currentlevel == '[0%]' ]; then | |
amixer set Capture 100 | |
echo "Mic unmuted" >> /tmp/mutelog | |
else |
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 | |
rfkill block bluetooth | |
iwconfig wlan0 power on | |
iwconfig wlan0 txpower 30mW | |
iwconfig wlan0 power timeout 500ms | |
killall dropbox | |
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy | |
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
NewerOlder