- 1
/(?<=это же )отсос\?/
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
/(?<=это же )отсос\?/
https://ideone.com/DbFj9D
+1
https://govnokod.xyz/fakes
0
/**
* <p>Статический метод размещает все аргументы и ключи по парам.</p> <p>Нечетные аргументы - массивы, четные - ключи, по которым искать в массивах.</p> <p>Ключи могут быть массивами. В этом случае поиск происходит во вложенных массивах. Возвращает первый не пустой элемент пары аргумент/ключ.</p>
*
*
* @param array $arraya массив для анализа
*
* @param array $string Ключи поиска
*
* @param strin $integerk Неограниченные последовательно проверяемые пары массив\ключ
*
* @param integer $mixeda
*
* @return mixed
*
* @static
* @link http://dev.1c-bitrix.ru/api_d7/bitrix/main/type/collection/firstnotempty.php
* @author Bitrix
*/
public static function firstNotEmpty()
{
$argCount = func_num_args();
for ($i = 0; $i < $argCount; $i += 2)
{
$anArray = func_get_arg($i);
$key = func_get_arg($i+1);
if (is_array($key))
{
$current = &$anArray;
$found = true;
foreach ($key as $k)
{
if (!is_array($current) || !array_key_exists($k, $current))
{
$found = false;
break;
}
$current = &$current[$k];
}
if ($found)
{
if (is_array($current) || is_object($current) || $current != "")
return $current;
}
}
elseif (is_array($anArray) && array_key_exists($key, $anArray))
{
if (is_array($anArray[$key]) || is_object($anArray[$key]) || $anArray[$key] != "")
return $anArray[$key];
}
}
return "";
}
Чо ?
+1
// https://gcc.gnu.org/onlinedocs/cpp/Directives-Within-Macro-Arguments.html
// Occasionally it is convenient to use preprocessor directives within the arguments
// of a macro. The C and C++ standards declare that behavior in these cases is
// undefined. GNU CPP processes arbitrary directives within macro arguments in
// exactly the same way as it would have processed the directive were the
// function-like macro invocation not present.
// If, within a macro invocation, that macro is redefined, then the new definition
// takes effect in time for argument pre-expansion, but the original definition is
// still used for argument replacement. Here is a pathological example:
#define f(x) x x
f (1
#undef f
#define f 2
f)
// which expands to
// 1 2 1 2
Ну и хуйня.
+1
use Unicornify::URL;
my $url = unicornify_url( email => '[email protected]' );
https://metacpan.org/pod/Unicornify::URL
+1
Функция УбратьПробел(стрЧисло)
//убирает пустой пробел
нСтр = "";
Для п=1 По СтрДлина(стрЧисло) Цикл
р = Сред(стрЧисло,п,1);
Если р = "1" ИЛИ р = "2" ИЛИ р = "3" ИЛИ р = "4" ИЛИ р = "5" ИЛИ р = "6" ИЛИ р = "7" ИЛИ р = "8" ИЛИ р = "9" ИЛИ р = "0" ИЛИ р = "," Тогда
нСтр = нСтр+р;
КонецЕсли;
КонецЦикла;
Возврат нСтр;
КонецФункции
Senior
+1
#!/usr/bin/perl
# Fetch all JS from govno
use strict;
use warnings FATAL => 'all';
use LWP;
my $res = LWP::UserAgent->new->request(HTTP::Request->new("GET" => "http://govnokod.xyz/"));
die "Failed: " . $res->code unless $res->is_success;
for (split /\n/, $res->content) {
print if /<script/ ... /script>/ and !m/[<>]/;
}
кууик.
Официальный тред для ржания над пятым перлом
0
Выборка = Запрос.Выполнить.Выбрать();
Пока Выборка.Следующий() цикл
Петух = Выборка.Хуй;
Прервать;
конеццикла;
классика
+1
import re, copy, json
config = {}
def domain_mapper(domain):
def injector(f):
if domain not in config:
config[domain] = []
config[domain].append(f)
return injector
def default(f):
config['default'] = [f]
return f
@domain_mapper("gmail.com")
@default
def google_filter(content):
regex = r"([^\!\?\.]*?offer.*?[\!\?\.])"
repl = r""
return re.sub(regex, repl, content, re.M)
@domain_mapper("gmail.com")
def another_google_filter(content):
return content
@domain_mapper("yandex.ru")
def yandex_filter(content):
regex = r"<img src=[\"'](.+?)[\"'].*/>"
repl = r"\1"
return re.sub(regex, repl, content, re.M)
@domain_mapper("mail.ru")
def mail_filter(content):
regex = r"<img src=[\"'](.+?)\.gif[\"'].*/>"
repl = r"<img src='\1.png'/>"
return re.sub(regex, repl, content, re.M)
Говно или нет?
+1
SCRIPT="<?php http_response_code(429); ob_clean(); //" php -S localhost:80 /proc/self/environ
sql injection is for kids, grownups use environment variable injection