Skip to content

Instantly share code, notes, and snippets.

@totaku
totaku / config.js
Created December 28, 2016 10:00
Используем свой smtp сервер ы Ghost
mail: {
transport: 'SMTP',
options: {
host: 'yourdomain.com',
secureConnection: true,
port: 465,
auth: {
user: 'ghost@yourdomain.com',
pass: '****'
}
@totaku
totaku / index.hbs
Created December 28, 2016 08:58
Подключаем комментарии Disqus в блог на Ghost
<span class="post-meta">
<time datetime="{{date format='YYYY-MM--DD'}}">{{date format="DD MMM YYYY"}}</time>
{{#if tags}}on {{tags}}{{/if}}
<a href="{{url}}#disqus_thread">Comments</a>
</span>
@totaku
totaku / default.hbs
Created December 28, 2016 08:55
Подключаем комментарии Disqus в блог на Ghost
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'example'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
@totaku
totaku / post.hbs
Created December 28, 2016 08:37
Подключаем комментарии Disqus в блог на Ghost
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'example'; // required: replace example with your forum shortname
var disqus_identifier = '{{post.id}}';
/* * * 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);
@totaku
totaku / recent_video.tpl.php
Created December 18, 2016 15:39
custom panel
<?php
if (empty($title)) {
$title = t('Видео');
}
?>
<!-- begin latest posts -->
<section>
<h2><?php print $title; ?> <span class="more">&ndash; <a href="<?php print url('video'); ?>"><?php print t('Смотреть все видео'); ?> &raquo;</a></span></h2>
<!-- begin post carousel -->
nginx:
image: nginx
ports:
- "80:80"
links:
- phpfpm
volumes:
- ./nginx:/etc/nginx/conf.d
- ./logs/nginx-error.log:/var/log/nginx/error.log
- ./logs/nginx-access.log:/var/log/nginx/access.log
# Используем за основу контейнера Ubuntu 14.04 LTS
FROM ubuntu:14.04
# Переключаем Ubuntu в неинтерактивный режим — чтобы избежать лишних запросов
ENV DEBIAN_FRONTEND noninteractive
# Устанавливаем локаль
RUN locale-gen ru_RU.UTF-8 && dpkg-reconfigure locales
# Добавляем необходимые репозитарии и устанавливаем пакеты
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ondrej/php5-5.6
global-styling:
version: 1.x
css:
theme:
css/flexslider.css: {}
css/style.css: {}
js:
js/jquery.flexslider-min.js: {}
js/jquery.smooth-scroll.js: {}
js/custom.js: {}
core: 8.x
type: theme
base theme: aegan
name: 'Haruo'
description: 'My first Drupal8 subtheme'
package: 'Custom'
# Regions
regions:
server {
server_name www.example.ru;
return 301 $scheme://example.ru$request_uri;
}
server {
server_name example.ru;
root /home/user/www/example.ru/main; ## <-- Your only path reference.
access_log off;