yum remove -y docker docker-common docker-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce-17.12.0.ce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Advert Snippet | |
class AdvertPlacement(models.Model): | |
page = ParentalKey('wagtailcore.Page', related_name='advert_placements') | |
advert = models.ForeignKey('demo.Advert', related_name='+') | |
class Advert(models.Model): | |
page = models.ForeignKey( | |
'wagtailcore.Page', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import shutil | |
import warnings | |
from django.core.management import execute_from_command_line | |
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Formatting { | |
set showbreak=>\ \ \ " Long line wrap beginning of new line | |
set nowrap " Don't wrap long lines | |
set smartindent " Indent at the same level of the previous line | |
set shiftwidth=4 " Use indents of 4 spaces | |
set expandtab " Tabs are spaces, not tabs | |
set tabstop=4 " An indentation every four columns | |
set softtabstop=4 " Let backspace delete indent | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
set splitright " Puts new vsplit windows to the right of the current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, shutil | |
from django.conf import settings | |
from django.core.management.base import NoArgsCommand | |
from django.core.management import call_command | |
class Command(NoArgsCommand): | |
def handle_noargs(self, **options): | |
fixtures_dir = os.path.join(settings.PROJECT_ROOT, 'demo', 'fixtures') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wagtaildemo wagtaildemo]$ python manage.py ref_applications_1 | |
<AuthConfig: auth> | |
<class 'django.contrib.auth.models.Permission'> | |
<class 'django.contrib.auth.models.Group'> | |
<class 'django.contrib.auth.models.User'> | |
<ContentTypesConfig: contenttypes> | |
<class 'django.contrib.contenttypes.models.ContentType'> | |
<SessionsConfig: sessions> | |
<class 'django.contrib.sessions.models.Session'> | |
<MessagesConfig: messages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch | grep feature/ | while read feature | |
do | |
git branch -D $feature | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Setup vim-plug -----------------------------------------------------------{{{ | |
" Declare Plugin system Config | |
call plug#begin('~/.local/share/nvim/plugged') | |
" UI enhance | |
Plug 'Yggdroot/indentLine' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'itchyny/lightline.vim' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gistup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =============================== | |
# = DATA SOURCE | |
# =============================== | |
# Set here configurations for the database connection | |
spring.datasource.url=jdbc:postgresql://localhost:5432/springbootdb | |
spring.datasource.username=postgres | |
spring.datasource.password=postgres@123 | |
spring.datasource.driver-class-name=org.postgresql.Driver | |
# Keep the connection alive if idle for a long time (needed in production) | |
spring.datasource.testWhileIdle=true |
OlderNewer