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
>> s = "Räksmörgås".encode Encoding::ISO8859_1 | |
=> "R\xE4ksm\xF6rg\xE5s" | |
>> Benchmark.measure { 100000.times { a = s.encoding != Encoding::UTF_8 ? s.encode(Encoding::UTF_8) : s } } | |
=> 2.590000 0.010000 2.600000 ( 2.585933) | |
>> s = "Räksmörgås" | |
=> "Räksmörgås" | |
>> Benchmark.measure { 100000.times { a = s.encoding != Encoding::UTF_8 ? s.encode(Encoding::UTF_8) : s } } | |
=> 0.010000 0.000000 0.010000 ( 0.014274) |
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
cat <<EOF >/usr/local/share/config.site | |
CFLAGS="-march=native -mtune=native -fomit-frame-pointer -O2" | |
CC="gcc" | |
CPPFLAGS='-I/usr/local/include' | |
LDFLAGS='-L/usr/local/lib -R/usr/local/lib' | |
EOF |
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
# Serial console for both OS and GRUB | |
echo "sx:2345:respawn:/sbin/agetty 9600 ttyS1 vt100" >> /etc/inittab | |
cd /boot/grub | |
mv grub.conf grub.conf.orig | |
cat <<EOF >grub.conf | |
serial --unit=1 --speed=9600 | |
terminal --timeout=10 serial console | |
default=0 | |
timeout=5 |
NewerOlder