- 1
 
sleh = UpCase(92); // просто слеш
                                    Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 168
+144
sleh = UpCase(92); // просто слеш
                                    Просто слеш.
−119
import inspect
def phpformat(fmt):
    return fmt.format(**inspect.getouterframes(inspect.currentframe())[1][0].f_locals)
surname = "Бонд"
name = "Джеймс"
num = 7
print(phpformat("{surname}. {name} {surname}. Агент {num:03d}."))
                                    
            PHP'шная интерполяция строк теперь и в питоне.
Родилось в http://govnokod.ru/18147#comment285697
        
+144
Шёл 2015 год, а SQLite на ведре так и не научился сравнивать не ASCII'шные строки без учёта регистра...
                                    Или это у меня руки из жопы растут?
+144
info->cipher_oid = oid_to_string(p->header2->header3->header4->header5->cipher_oid);
info->hash_oid = oid_to_string(p->header2->header3->header4->header5->hash_oid);
                                    Вчера наговнокодил.
+143
/*
 * BIG UGLY WARNING! This is so damn ugly I wanna puke.  Unfortunately, some
 * macros that use ASN1_const_CTX still insist on writing in the input
 * stream.  ARGH! ARGH! ARGH! Let's get rid of this macro package. Please? --
 * Richard Levitte      
 */
                                    OpenSSL...
+79
private short findHeaderLength() {
    return (short)(
        1+
        3+
        4+
        2+
        2+
        2+
        1+
        1+
        4+
        4+
        4+
        1+
        1+
        2+
        (32*fieldArray.length)+
        1
    );
}
                                    DBFHeader
+60
std::string s = "a" /* + */ "b";
                                    
+133
HTTP referer (originally a misspelling of referrer) is an HTTP header field that identifies the address of the webpage
(i.e. the URI or IRI) that linked to the resource being requested.
                                    Originally a misspelling of referrer...
+141
/* The DNS spec is officially case-insensitive, but for those times when you
*really* wanna see any and all discrepancies, by all means define this. */
#ifdef ANAL
    if (strcmp (poop->name, hp->h_name) != 0) { /* case-sensitive */
#else
    if (strcasecmp (poop->name, hp->h_name) != 0) { /* normal */
#endif
                                    Из первой версии netcat'а.
−113
arp_monitor() {
    echo "ARP monitor started on $LAN_IFACE..."
    tcpdump -l -n -i $LAN_IFACE ether src not $LAN_MAC 2>/dev/null | awk 'BEGIN{FS="[ ,]"}{if ($2 == "ARP" && $4 == "Request") print $6, $8;}' | while read GATEWAY CLIENT; do
        if [ "$GATEWAY" == "$CLIENT" ]; then
            echo "Got ARP collision probe gw=$GATEWAY client=$CLIENT"
        else
            echo "Got ARP request gw=$GATEWAY client=$CLIENT"
            ip addr add "$GATEWAY/32" dev "$LAN_IFACE" 2>/dev/null
            ip route add "$CLIENT/32" dev "$LAN_IFACE" 2>/dev/null
        fi
    done
}
                                    Фрагмент моего magic router'а, который раздаёт инет любому воткнутому в него компу (ну кроме совсем паталогических случаев).