<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'shortname'; // здесь пишем общее имя сайта или форума
var disqus_identifier = '{{ news.title }}{{news.id }}'; //здесь создаем уникальный индификатор, что б для каждой новости были свои комментарии. Я создал из названии новости и её id
var disqus_title = '{{ news.title }}'; Не имею понятия что это такое, но так работает.
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
Все сидят в офисе и нужен один аккаунт.- мягко скажем, с одним аккаунтом на всех вас забанят(по идее). Вообще, на одеске два варианта: individual либо agency.
$stateProvider.state({
resolve: {
list: function (service) {
return service.list();
}
},
controller: function (list) {
this.list = list;
}
});
$ git config --global core.whitespace \
trailing-space,space-before-tab,indent-with-non-tab
man 5 shadow
man 3 crypt
If salt is a character string starting with the characters
"$id$" followed by a string terminated by "$":
$id$salt$encrypted
then instead of using the DES machine, id identifies the
encryption method used and this then determines how the rest
of the password string is interpreted. The following values
of id are supported:
ID | Method
─────────────────────────────────────────────────────────
1 | MD5
2a | Blowfish (not in mainline glibc; added in some
| Linux distributions)
5 | SHA-256 (since glibc 2.7)
6 | SHA-512 (since glibc 2.7)
So $5$salt$encrypted is an SHA-256 encoded password and
$6$salt$encrypted is an SHA-512 encoded one.
AUTH_USER_MODEL = 'myapp.MyUser'
class Article(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL)
def post_save_receiver(signal, sender, instance, **kwargs):
pass
post_save.connect(post_save_receiver, sender=settings.AUTH_USER_MODEL)
class MyUser(AbstractBaseUser):
identifier = models.CharField(max_length=40, unique=True)
...
USERNAME_FIELD = 'identifier'
class MyUser(AbstractBaseUser):
...
date_of_birth = models.DateField()
height = models.FloatField()
...
REQUIRED_FIELDS = ['date_of_birth', 'height']
$ time seq 500000 | xargs touch
real 0m9.208s
# echo 3> /proc/sys/vm/drop_caches
$ time ls -U | wc -l
500000
real 0m0.393s
$ time ls | wc -l
500000
real 0m3.149s
$content = file_get_contents('/path/to/file/in/private/dir/filename');
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$file_info->title.'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . strlen($content));
echo ($content);
location /protected/ {
root /www/mysite.com/;
rewrite ^/protected/(.*)$ /$1 break;
internal;
}
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$file_info->title.'"');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('X-Accel-Redirect: /protected'. $file_info->file);