Получение серийного номера HDD во FreeBSD
camcontrol identify ada1 | grep serial
28 ноября 2014, 12:41
camcontrol identify ada1 | grep serial
ulimit -n 200000Чтобы значение не сбрасывалось пишем в /etc/sysctl.conf
fs.file-max = 200000Также пишем в /etc/security/limits.conf
* hard nofile 200000 * soft nofile 200000И еще устанавливаем значение тут (в необходимости этого пункта не уверен)
echo 200000 > /proc/sys/fs/file-max
<div id="banner"></div>
<script>
function showBanner(elem) {
var banners = [
{
'src': 'http://url1.jpg',
'url': 'http://url1.page',
'alt': 'title1'
},
{
'src': 'http://url2.jpg',
'url': 'http://url2.page',
'alt': 'title2'
},
{
'src': 'http://url3.jpg',
'url': 'http://url3.page',
'alt': 'title3'
}
];
var banner = banners[Math.floor(Math.random() * banners.length)];
elem.innerHTML = '<a href="' + banner.url + '"><img src="' + banner.src + '" alt="' + banner.alt + '" />';
}
showBanner(document.getElementById('banner'));
</script>
env X="() { :;} ; echo busted" bash -c "echo stuff"
/usr/ports/www/mod_php5 либо /usr/ports/www/mod_php55
<!doctype html>
<html>
<body>
<a href="http://google.com">click</a>
</body>
<script>
document.onmouseup = function(){
if (getCookie('bdclk') == undefined) {
setCookie('bdclk', 1, '/', 24*3600);
window.open('http://www.ya.ru', '_blank');
return true;
}
return false;
};
function getCookie(name) {
if (/\W/.test(name)) return undefined;
var matches = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
function setCookie(name, value, path, expires) {
var date = new Date( new Date().getTime() + expires * 1000 );
document.cookie = name + '=' + value + '; path=' + '/' +'; expires=' + date.toUTCString();
return true;
}
</script>
</html>
git log -1Также текущий хеш коммита
git rev-parse HEAD
<?php
for ($i = 1; $i <= 395; $i++) {
$file = __DIR__ . '/storage/' . $i . '.html';
echo "get $i \n";
if (!file_exists($file)) {
copy("http://webcache.googleusercontent.com/search?q=cache:snippets.pp.ru/article/$i", $file);
sleep(10);
}
}
?>
С локального компа мне не удалось скачать все статьи, гугл меня забанил где-то после 80 штук, на каждый запрос вылазила капча, поэтому пришлось задействовать несколько сервачков :D
Кстати, задание юзер агента и прочих заголовков не помогало, дело именно в частоте запросов, так что если будете качать с кеша гугла, то ставьте побольше таймауты, либо запасайтесь серваками.
Но через пару дней гугл все равно разбанивает.
rpm -Uvh http://dl.atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-7.el6.x86_64.rpm yum install -y ffmpeg ffmpeg-devel
sudo apt-get install linux-image-$(uname -r)
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum update atomic-release yum upgradeЕсли не помогло, то
get -q -O - https://www.atomicorp.com/installers/atomic | sh
redis-server --service-install redis-server --service-startПроверка
redis-cli 127.0.0.1:6379>keys *
@reboot = выполняется при запуске сервера @yearly = 0 0 1 1 * @annually = @yearly @monthly = 0 0 1 * * @weekly = 0 0 * * 0 @daily 0 0 * * * @midnight = @daily @hourly = 0 * * * *
<?php
$groupId = 'mdk'; //ид группы
$offset = 0; //смещение
$limit = 100; //лимит
$fields = 'domain'; //запросим урл личной страницы
$sort = 'id_desc'; //сортировка
$data = file_get_contents("https://api.vk.com/method/groups.getMembers?group_id=$groupId&v=5.21&sort=$sort&offset=$offset&count=$limit&fields=$fields");
$data = json_decode($data, true);
print_r($data);
chattr -i /home/pathtofile rm -rf /home/pathtofile
yum --disablerepo=* --enablerepo=nginx install nginx
ctrl+a :quit
screen -X -S [session # you want to kill] quit
yum install postfix cyrus-sasl-plain cyrus-sasl-md5
relayhost = [smtp.mailgun.org]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = static:postmaster@mydomain.com:password smtp_sasl_security_options = noanonymous
service postfix start
<?php
mail('to@mail.ru', 'theme', 'это тест', "From: from@mydomain.com\r\nContent-type:text/plain;charset=utf-8");