This file contains hidden or 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
| set ftp:list-options '-a' | |
| set ftp:ssl-allow false |
This file contains hidden or 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 | |
| raid=cciss | |
| maxdisks=7 | |
| for i in {0..7}; do | |
| temp=$(smartctl -a -d $raid,$i /dev/sda | grep "Current Drive Temperature:" | awk -F: '{ print $2}') | |
| [ -z "$temp" ] && temp=$(smartctl -a -d $raid,$i /dev/sda | grep "Temperature_Celsius" | grep -oE "[0-9]+" | xargs | cut -d ' ' -f7); | |
| [ -n "$temp" ] && echo slot $i: $temp; | |
| done |
This file contains hidden or 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
| # this may be possible mistakes | |
| WS-C2960-24TT-L | |
| WS-C2960-24LC | |
| WS-C2960j-mmnnn-o | |
| j = is gigabit or not | |
| G - gigabit ethernets |
This file contains hidden or 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 | |
| # reference https://serverfault.com/questions/544651/vlan-tags-not-shown-in-packet-capture-linux-via-tcpdump | |
| tcpdump -i eth0 -Uw - arp | tcpdump -en -r - vlan 804 |
This file contains hidden or 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
| To check if OpenGL OMTC is enabled, go to about:support and under the "Graphics" section look for "GPU Accelerated Windows". If it reports "0/1 Basic (OMTC)" (possibly 0/2), OpenGL OMTC is disabled; if it reports "1/1 OpenGL (OMTC)" (possibly 1/2 or 2/2) it is enabled. | |
| To enable OpenGL OMTC go to about:config and set: | |
| layers.acceleration.force-enabled true | |
| layers.offmainthreadcomposition.enabled true (default) | |
| Restart Firefox for changes to take effect. |
This file contains hidden or 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
| ################################################## | |
| # Kill long queries # | |
| # This shell script will kill queries that have # | |
| # passed the $MAX execution time. # | |
| # Julian Capilla-krumbak # | |
| # lyhan_jr@hotmail.com # | |
| # 21-05-2014 # | |
| ################################################## | |
| #!/bin/bash |
This file contains hidden or 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
| ## some useful aliases | |
| alias ls "ls -h" | |
| alias dir ls | |
| alias less more | |
| alias zless zmore | |
| alias bzless bzmore | |
| alias mirror "mirror -v" | |
| alias sync "mirror -R -v -n" | |
| alias reconnect "close; cache flush; cd ." | |
| alias edit "eval -f \"get $0 -o ~/.lftp/edit.tmp.$$ && shell \\\"cp -p ~/.lftp/edit.tmp.$$ ~/.lftp/edit.tmp.$$.orig && $EDITOR ~/.lftp/edit.tmp.$$ && test ~/.lftp/edit.tmp.$$ -nt ~/.lftp/edit.tmp.$$.orig\\\" && put ~/.lftp/edit.tmp.$$ -o $0; shell rm -f ~/.lftp/edit.tmp.$$*\"" |
This file contains hidden or 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
| require("lsqlite3") | |
| -- Igmar: Wanneer closen we dat DB object eigenlijk ? | |
| db = sqlite3.open('/etc/asterisk/users.sqlite') | |
| --CONSOLE = "Console/dsp" -- Console interface for demo | |
| --CONSOLE = "DAHDI/1" | |
| --CONSOLE = "Phone/phone0" | |
| TRUNK = "DAHDI/G1" |
This file contains hidden or 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 | |
| IFS='|' | |
| # Id | User | Host | db | Command | Time | State | Info | Progress | |
| mysqladmin pr | sed -E 's/\s+//g' | grep -v '\-\-\-' | grep -vi Time | while read -r id1 id user host db command time state info progress; do | |
| [ -z "$time" ] && continue; | |
| [ "$command" = "Sleep" ] && continue; | |
| if [ "$time" -gt 300 ]; then | |
| mysql -e "kill $id" | |
| echo "killing $id ($db) $info" |
This file contains hidden or 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
| # cat /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| BOOTPROTO="static" | |
| HWADDR="00:26:6C:F3:11:A8" # match network interface by mac address | |
| ONBOOT="yes" | |
| TYPE="Ethernet" | |
| IPADDR=XXX.XXX.XXX.XXX | |
| PREFIX=24 | |
| GATEWAY=XXX.XXX.XXX.XXX | |
| DNS1=8.8.8.8 |