- 1
Пидор из ульяновска уебище сраное ты меня достал завтра как и обещал отнесу на тебя заявление, хуепутало задроченное, выблядок кровавый
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+145
Пидор из ульяновска уебище сраное ты меня достал завтра как и обещал отнесу на тебя заявление, хуепутало задроченное, выблядок кровавый
+144
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=43405 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=78686 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=9113 HTTP/1.0" 200 5324 "-" "KomprendaTrueTrolle"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=16996 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=37937 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=78866 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=79800 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=17157 HTTP/1.0" 200 5324 "-" "Nechego Byilo Vesti Sebya Po Svinski"
212.176.111.43 - - [21/Dec/2010:20:54:58 +0300] "GET /index.php?inc=27515 HTTP/1.0" 200 5324 "-" "KomprendaTrueTrolle"
некто под ником itsem ищет php-injection
+161
$ecapacity = "0";
if (isset($_POST['ecapacity2'])) {
$ecapacity = $_POST['ecapacity1'] . "." . $_POST['ecapacity2'];
} else {
$ecapacity = $_POST['ecapacity1'];
}
if ($ecapacity != "--.") {
$where = $where + array('e_capacity' => $ecapacity);
$where = $where + array('engine' => $ecapacity);
} else {
$where = $where + array('e_capacity' => '0');
}
нужно было ввести число с точкой, к чему было вводить два поля ввода разделённых точкой, и два поля в БД float и varchar мне до сих пор не понятно. видимо заборное ЛСД чуваку попалось
+170
// ==UserScript==
// @name Skip GK comments
// @namespace GK
// @description Skip GK comments
// @include http://govnokod.ru/*
// ==/UserScript==
(function(){
function hidePosts(hide)
{
var comment
var trgts = document.evaluate("//strong[@class='entry-author']", document, null, XPathResult.ANY_TYPE, null);
var lst = new Array()
while (trgt = trgts.iterateNext())
lst.push(trgt)
for (trgt in lst)
{
res = hide.exec(lst[trgt].innerHTML);
if (res)
{
comment = lst[trgt].parentNode.parentNode.parentNode;
comment.style.display='none';
}
}
}
var hide = /komprenda/i
hidePosts(hide)
})();
Клин клином вышибают.
+82
/**
* Delete. *
* @param entity the entity
* @return true, if successful
*/
public boolean delete(T entity) {
boolean deleted=false;
getSession().delete(entity);
flush();
//when no hibernate runtime exception has arised...set to true.
deleted = true;
return deleted;
}
Our lovely tech lead has written this
+170
class PHP {
function __construct(){
ob_start();
}
function echо ( $string='' ) {
echo $string . '<br/>';
}
function __destruct() {
ob_end_flush();
}
}
$php = new PHP();
$string = "It's work!";
$php->echо( $string );
/*
Пишу собственный шаблонизатор. Назову его "PHP Template Engine"
Помогите кто может, кто может помогите
*/
...Не в пример всяким Smarty...
+81
// gotta love this hack
final private static String PADDING =
" ";
private static String stringFormat(String stringToFormat, int fieldSize, boolean rightJustify) {
// and Java doesn't really excel at this kind of thing either
if (stringToFormat.length() >= fieldSize) {
return stringToFormat.substring(0, fieldSize);
} else {
return rightJustify ?
PADDING.substring(0, fieldSize - stringToFormat.length()) + stringToFormat:
stringToFormat + PADDING.substring(0, fieldSize - stringToFormat.length());
}
}
+162
//exit;
define("CACHE_USE", false);
require("/usr/home/<path_to_config>/config.php");
require_once(PATH_CLASSES . "/DB.Class.php");
DB::connect(DBHOST, DBUSERNAME, DBPASSWORD, DBNAME);
checkLongProcesses();
sleep(30);
checkLongProcesses();
function checkLongProcesses() {
$pslist = DB::query("SHOW PROCESSLIST");
if (sizeof($pslist) > 25) {
mail("[email protected]", "SQL Processes Monitor Report", print_r($pslist, true));
echo "Killing long queries...\n\n";
foreach ($pslist as $el) {
if ($el['Time']>10) {
echo "Killing process: " . $el['Id'] . "\n";
echo $el['Info'] . "\n\n";
DB::query("KILL " . $el['Id']);
}
}
}
}
Достался проект с кодом различной говнистости. Вот такое, например, запускается кроном каждые 10 минут.
+166
<?
$nofoto="avatars/photo_no_160x200.gif";
$query = "SELECT id , foto FROM `users` WHERE `foto` != '{$nofoto}'";
$res = mysql_query($query);
while($row = mysql_fetch_array($res))
echo '<table border="1" cellpadding="5" cellspacing="0">
<tr> '.$row["id"].'
<td><img class="photo" height="200" width="160" src="'.$row["foto"].'" title="" alt="">< /td>
< /tr>
< /table> ';
+144
public static const INFINITY:int = 100000;
а вы говорите, что скорость света недостижима... Вон, мы даже уже бесконечность обозначили!