Skip to content

Instantly share code, notes, and snippets.

Oleg Molchanov zaemiel

Block or report user

Report or block zaemiel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d6ffaccb0c316b68d6094e4d08e86508
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
'datefmt' : "%d/%b/%Y %H:%M:%S"
},
'simple': {
'format': '%(levelname)s %(message)s'
@zaemiel
zaemiel / gist:0e7053ef5b135684be9a481b102ef390
Created Jul 20, 2018
Django pagination with bootstrap snippet
View gist:0e7053ef5b135684be9a481b102ef390
{% for n in posts.paginator.page_range %}
{% if posts.number == n %}
<li class="page-item active">
<span class="page-link">{{ n }}<span class="sr-only">(current)</span></span>
</li>
{% elif n > posts.number|add:'-2' and n < posts.number|add:'2' %}
<li class="page-item"><a class="page-link" href="?page={{ n }}">{{ n }}</a></li>
{% endif %}
@zaemiel
zaemiel / gist:411567c0a396e266ca4a412329f9f4ca
Created Apr 19, 2018
Nemo: How to open current folder in a terminal by a keyboard shortcut (Mint 18.x Cinnamon)
View gist:411567c0a396e266ca4a412329f9f4ca
1. Firstly, i have to create a .gnome2/accels/nemo file
cd .gnome2 (a hidden folder. If there is no one - create it)
mkdir accels
touch accels\nemo
2. Reboot system.
After rebooting the .gnome2/accels/nemo file will be filled with an autogenerated info.
3. Ctrl + F
View How to link Sublime Text Build system to Python 3
@zaemiel
zaemiel / CKEditor installation and integration with Active Admin
Last active May 19, 2019
CKEditor installation and integration with Active Admin
View CKEditor installation and integration with Active Admin
1. Gemfile
gem 'ckeditor', github: 'galetahub/ckeditor'
2. bundle install
3. app/assets/javascripts/application.js
//= require ckeditor/init
4. config/initializers/active_admin.rb
@zaemiel
zaemiel / CSS vertical align of text block within div
Last active Aug 29, 2015
CSS vertical align of text block within div
View CSS vertical align of text block within div
**A.) If you only have one line of text:**
HTML:
<div>vertically centered text</div>
CSS:
div
{
You can’t perform that action at this time.