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
#!/usr/bin/bash | |
echo "Looking for failed csum inodes...." | |
inodes=`dmesg | grep csum | sed 's/^.*ino \([0-9]*\) .*$/\1/g' | uniq` | |
echo "Finding system files from inodes..." | |
sysfiles=`for i in $inodes; do find /etc /opt /root /srv /usr /var -inum $i 2>/dev/null; done` | |
echo "Finding user files from inodes..." | |
homefiles=`for i in $inodes; do find /home -inum $i 2>/dev/null; done` | |
echo "Attempting to reinstall corrupted packages..." | |
# Get list of packages with corrupt files | |
packages=$(for f in $sysfiles; do pacman -Qqo $f 2>/dev/null; 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
import System.Environment (getArgs) | |
import Control.Monad (liftM) | |
import Criterion.Main | |
testElemS :: String -> Bool | |
testElemS = flip elem ["a", "b", "c", "d", "e"] | |
testCondS :: String -> Bool | |
testCondS x = (x == "a" || x == "b" || x == "c" || x == "d" || x == "e") |
NewerOlder