1. JavaScript / Говнокод #25689

    +4

    1. 1
    this.checkArrayErrors() ? (this.canSend = true) : (this.canSend = false);

    Код разраба, который не прошел испытательный срок и сказал что к нему придираются.

    UnQu1et, 28 Июня 2019

    Комментарии (88)
  2. Куча / Говнокод #25688

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    <meta property="al:ios:app_name" content="Instagram" />
    <meta property="al:ios:app_store_id" content="389801252" />
    <meta property="al:ios:url" content="instagram://user?username=xxxxxxxx" />
    <meta property="al:android:app_name" content="Instagram" />
    <meta property="al:android:package" content="com.instagram.android" />
    <meta property="al:android:url" content="https://www.instagram.com/_u/xxxxxxxx/" />
            
    # pyre-fixme[6]: Expected `Dict[str, Any]` for 2nd param but got
    #  `Mapping[str, Any]`.
    <link rel="canonical" href="https://www.instagram.com/xxxxxxxx/" />

    Что такое в 8-й и в 9-й строке и какое это имеет отношение к «HTML»?

    PA3yMHblu_nemyx, 26 Июня 2019

    Комментарии (65)
  3. PHP / Говнокод #25687

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    <script>
        var myMap;
        var ymapsReady = function () {
            myMap = new ymaps.Map('<?= $options['containerId'] ?>', {
                center: [55.751574, 37.573856],
                zoom: 9,
                controls: []
            }, {
                searchControlProvider: 'yandex#search'
            });
    
            <?php
            if(isset($options['centerCoordinates'])){
            ?>
            myMap.setCenter(<?= $options['centerCoordinates'] ?>);
            <?php
            }elseif(isset($options['centerAddress'])){?>
            ymaps.geocode('<?= $options['centerAddress'] ?>', {
                results: 1
            }).then(function (res) {
                var firstGeoObject = res.geoObjects.get(0),
                    coords = firstGeoObject.geometry.getCoordinates();
                myMap.setCenter(coords);
            });
            <?php
            }
    
            if (!empty($options['salesOffices'])) {
                foreach( $options['salesOffices'] as $i => $salesOffice ) {
                $address = ArrayHelper::getValue($salesOffice, 'actual_address');
                ?>
                ymaps.geocode('<?= $address ?>', {
                    results: 1
                }).then(function (res) {
                    let firstGeoObject = res.geoObjects.get(0),
                        coords = firstGeoObject.geometry.getCoordinates();
    
                    ymaps.geocode(coords, {
                        kind: 'metro',
                        results: 2
                    }).then(function (res) {
                        res.geoObjects.each(function (geoObject) {
                            $('#placemark_<?= $i ?>').find('.metro').append("<div class='metro-item'>" + geoObject.getPremise().replace(/(^|\s)метро(\s|$)/g, '').replace(/(^|\s)станция(\s|$)/g, '') + '</div>');
                        });
                    });
    
                    let customIcon = ymaps.templateLayoutFactory.createClass('<div id="placemark_icon_<?= $i ?>" class="placemark-block"><div class="placemark"></div><div class="placemark-text"><?= ArrayHelper::getValue($salesOffice, 'name') ?></div></div>');
    
                    myPlacemark[<?= $i ?>] = new ymaps.Placemark(coords,
                        {
                            balloonContent: '<?= ArrayHelper::getValue($salesOffice, 'name') ?>',
                            iconCaption: customIcon,
    
                            iconLayout: 'default#imageWithContent',
                            iconContentLayout: customIcon
                        }, {
                            hintContent: '<?= ArrayHelper::getValue($salesOffice, 'name') ?>',
                            iconLayout: 'default#imageWithContent',
                            iconImageHref: '',
                            iconImageOffset: [-15, -27],
                            iconContentLayout: customIcon
                        });
    
                    myMap.geoObjects.add(myPlacemark[<?= $i ?>]);
                });
    
                <?php
                }
            }
            ?>
        };
    
        setTimeout(function () {
            ymaps.ready(ymapsReady);
        }, <?=( isset($options['isModal']) ? 500 : 0 )?>);
    </script>

    iErroRi, 25 Июня 2019

    Комментарии (8)
  4. Куча / Говнокод #25685

    −4

    1. 1
    Андроидотред #3

    #1: https://govnokod.xyz/_19062
    #2: https://govnokod.xyz/_25537 (стерла пидорва сракер)

    syoma, 22 Июня 2019

    Комментарии (167)
  5. Куча / Говнокод #25684

    −3

    1. 1
    IT Оффтоп #14

    #1: http://govnokod.ru/18142 http://govnokod.xyz/_18142
    #2: http://govnokod.ru/18378 http://govnokod.xyz/_18378
    #3: http://govnokod.ru/19667 http://govnokod.xyz/_19667
    #4: http://govnokod.ru/21160 http://govnokod.xyz/_21160
    #5: http://govnokod.ru/21772 http://govnokod.xyz/_21772
    #6: http://govnokod.ru/24063 (потёр пидор сракер) http://govnokod.xyz/_24063
    #7: http://govnokod.ru/24538 http://govnokod.xyz/_24538
    #8: http://govnokod.ru/24815 (потёр пидор сракер) http://govnokod.xyz/_24815
    #9: http://govnokod.ru/24867 http://govnokod.xyz/_24867
    #10: https://govnokod.ru/25328 https://govnokod.xyz/_25328
    #11: https://govnokod.xyz/_25436/ http://govnokod.ru/25436 (потёр пидор сракер)
    #12: http://govnokod.xyz/_25471/
    #13: http://govnokod.xyz/_25590/ (потёр пидор сракер)

    syoma, 21 Июня 2019

    Комментарии (1256)
  6. bash / Говнокод #25683

    −1

    1. 1
    2. 2
    if [[ $(git log -n 1 --format=%D HEAD) == *"merge"* ]]; then
        sed -i "s/GIT_COMMIT\(.*\)/GIT_COMMIT=$(git rev-list HEAD | sed -n 2p)/" env.list

    goose123, 20 Июня 2019

    Комментарии (5)
  7. JavaScript / Говнокод #25682

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    document.onmousemove = (el) => {
                    if (this.rot) {
                        var s_x = el.pageX, s_y = el.pageY;
                        if (s_x !== o_x && s_y !== o_y){
                            var s_rad = Math.atan2(s_y - o_y, s_x - o_x);
                            s_rad -= Math.atan2(h_y - o_y, h_x - o_x);
    
                            var dgr = (s_rad * (360 / (2 * Math.PI)));
                            element.initPositions.rotateDeg = dgr;
                            element.styles.transform = 'rotate(' + dgr + 'deg)';
                        }
                    }
    };

    А, как я сразу не понял, что это просто ротейт елемента...

    websbkinfo, 20 Июня 2019

    Комментарии (41)
  8. Куча / Говнокод #25681

    +2

    1. 1
    https://youtu.be/CDqG6eGWo0I

    Давайте вспомним свой 94.

    3oJIoTou_xyu, 20 Июня 2019

    Комментарии (91)
  9. Куча / Говнокод #25680

    0

    1. 1
    https://habr.com/ru/post/456558/

    Какой багор )))))))))))))))))))))))))))))))))))))))) ))))))))))))))))))

    AHCKuJlbHblu_nemyx, 19 Июня 2019

    Комментарии (80)
  10. Куча / Говнокод #25679

    −1

    1. 1
    https://vc.ru/services/71897-specialist-po-infobezopasnosti-iz-kazahstana-zapustil-telegram-bota-mailsearchbot-kotoryy-vydaet-paroli-po-adresu-pochty

    Проверь

    AHCKuJlbHblu_nemyx, 18 Июня 2019

    Комментарии (233)