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
interface=wlan0 | |
driver=nl80211 | |
country_code=RO | |
ieee80211d=1 | |
ssid=SSIDNAME | |
channel=6 | |
hw_mode=g |
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 | |
dd if=/dev/vg/sys01 | pv -ptera -s 10g | dd of=/dev/vg/sys02 |
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
shutdown /s /f /t 3600 | |
REM where | |
REM /s - shutdown local computer | |
REM /f - force programs to close without showing warning | |
REM /t 3600 - delay for 3600 seconds (1 hour) |
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 | |
while read NAME; do | |
YEAR=$(echo $NAME | sed -r 's/\ -\ /_/' | awk -F_ '{print $1}') | |
NEWNAME=$(echo $NAME | sed -r 's/\ -\ /_/' | awk -F_ '{print $2}') | |
mv "$NAME" "$NEWNAME ($YEAR)" | |
done < <(ls -1 | grep -v rename.sh) | |
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 | |
REQUIRED_CONNECTION_NAME="NAME" | |
VPN_CONNECTION_NAME="VPN_NAME" | |
activ_con=$(nmcli con status | grep "${REQUIRED_CONNECTION_NAME}") | |
activ_vpn=$(nmcli con status | grep "${VPN_CONNECTION_NAME}") | |
if [ "${activ_con}" -a ! "${activ_vpn}" ]; | |
then |
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
grep "UNCOMPRESSED PACKAGE SIZE" /var/log/packages/* | sed 's/ *//g' | awk -F: '{ print $3" " $1 }' | sort -rh | head -n10 |
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
SELECT order_id,product_name,qty | |
FROM orders | |
INTO OUTFILE '/tmp/orders.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n' |
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 | |
count=0 | |
for DISK in sda sdb sdc sdd sde sdf; do | |
/usr/sbin/smartctl --all /dev/$DISK > /var/www/htdocs/status/data/smart$count.txt | |
((count++)) | |
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
#!/bin/bash | |
screen -dmS servers -T xterm -t "http" sh -c 'cd /servers/start/httpo;run.sh' | |
screen -T xterm -S "servers" -X screen screen -t "sql" sh -c 'cd /servers/start/sql;run.sh' | |
# The "-T xterm" switch isn't really necessary, unless you plan to use curses-based programs from inside the screen (mc, less, etc.). |
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
In short, this is what I did to get my N800 to boot OS2008 from MMC. My steps were: | |
1) upgraded my N800 to OS2008, http://europe.nokia.com/A4305010 | |
2) enabled the Maemo Extras repository in Application Manager and added http://repository.maemo.org, Distribution: (blank) Components: free non-free | |
3) installed openssh using Application Manager | |
4) defined a root password (openssh's installer prompted for this) | |
5) opened xterm and: | |
# ssh root@localhost | |
# visudo |