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
UPDATE `mdl_user` SET `username` = concat(username,'.local') WHERE `auth` = 'email' and `deleted` = 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
Index: moodlelib.php | |
=================================================================== | |
RCS file: /cvsroot/moodle/moodle/lib/moodlelib.php,v | |
retrieving revision 1.960.2.168 | |
diff -p -r1.960.2.168 moodlelib.php | |
*** moodlelib.php 23 Feb 2011 20:23:52 -0000 1.960.2.168 | |
--- moodlelib.php 8 Apr 2011 00:05:59 -0000 | |
*************** function authenticate_user_login($userna | |
*** 3226,3231 **** | |
--- 3242,3255 ---- |
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
echo noop > /sys/block/sdb/queue/scheduler |
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 | |
# usage: download *.m3u | |
for m3u; do | |
dos2unix -q $m3u | |
iconv -f gbk -t utf8 $m3u | while IFS=" " read line; do | |
if [ "${line:0:11}" = "#EXTINF:-1," ]; then | |
filename=`basename $m3u .m3u`-${line:11:20}.mp3 | |
read url |
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
# Replace "auto eth0 ..." with following lines in /etc/network/interfaces | |
# The primary network interface | |
auto br0 | |
iface br0 inet static | |
address xxx.xxx.xxx.xxx | |
netmask xxx.xxx.xxx.xxx | |
network xxx.xxx.xxx.xxx | |
broadcast xxx.xxx.xxx.xxx | |
gateway xxx.xxx.xxx.xxx |
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
bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS | |
bcdedit.exe -set TESTSIGNING ON |
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 | |
SERVER_KEY=server-key.pem | |
# creating a key for our ca | |
if [ ! -e ca-key.pem ]; then | |
openssl genrsa -des3 -out ca-key.pem 1024 | |
fi | |
# creating a ca | |
if [ ! -e ca-cert.pem ]; 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
wget -qO- 'http://t.cn/zYJGEIH' | grep 'table border="0" style="border' -A 6 | sed 's/href="\//href="http:\/\/www.amazon.cn\//g' | mail -s "$(echo -e "Kindle今日特价\nContent-Type: text/html")" [email protected] |
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
wget -qO- 'http://t.cn/zYJGEIH' | grep 'table border="0" style="border' -A 180 | sed 's/href="\//href="http:\/\/www.amazon.cn\//g' | mail -s "$(echo -e "Kindle今日特价\nContent-Type: text/html")" [email protected] |