Install dependencies
sudo apt-get install libpq-dev python-dev
Note: If you're using python3, then use python-dev for python 3.
- Install PostgreSQL
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
#!/bin/sh | |
#stop mysql service | |
service mysql stop | |
#mount ramdisk | |
mkdir -p /tmp/db_ramdisk | |
mount -t tmpfs -o size=512M tmpfs /tmp/db_ramdisk | |
#create back-up |
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
function searchBox() { | |
var box = $("#box"); | |
if (box.length > 0) { | |
var elements = box.find("span"); | |
var lvl = box.attr("class"); | |
for(var i = 0; i < elements.length - 1; i++) { | |
if($(elements[i]).attr("style") != $(elements[i + 1]).attr("style")) { | |
$(elements[i]).click(); | |
if(lvl == box.attr("class")) { | |
$(elements[i + 1]).click(); |
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
# Python | |
*.py[cod] | |
venv/ | |
__pycache__/ | |
# Packages | |
dist/ | |
lib/ | |
lib64/ |
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
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s | %(asctime)s | %(name)s:%(funcName)s | %(process)d | %(thread)d | %(message)s' | |
}, | |
'simple': { | |
'format': '%(levelname)s | %(name)s | %(message)s' | |
}, |
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
#!/bin/bash | |
read -p "Project's folder (press Enter to install in current folder): " project_folder </dev/tty ; | |
read -p "Project name (required - letters, numbers underscore): " project_name </dev/tty ; | |
if [ -n "$project_folder" ]; then | |
mkdir $project_folder; cd $project_folder; | |
fi | |
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
emote: HEAD is now at e766da0 Move confirmed booking rendering in the same view. | |
remote: files changed: 5 | |
remote: ============================================ | |
remote: Exporting needed config variables (from .env) | |
remote: ============================================ | |
remote: ============================================ | |
remote: Installing nodejs dependencies | |
remote: ============================================ | |
.... | |
remote: [00:25:56] Using gulpfile /var/www/bakimli/gulpfile.js |
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
# app/sitemaps.py | |
''' | |
Example of sitemaps module for a list of products. | |
For more info about sitemaps check out django docs | |
https://docs.djangoproject.com/en/stable/ref/contrib/sitemaps/ | |
''' | |
from django.contrib.sitemaps import Sitemap | |
from .models import Product |
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
''' | |
This module contains interchangeable clients for sending notifications. | |
Use cases for those helpers: | |
- send notifications using a common interface; | |
- change the client in a transparent way (based on settings); | |
''' | |
from __future__ import unicode_literals | |
import logging |
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
# -*- coding: utf8 -*- | |
from __future__ import unicode_literals | |
import logging | |
import sys | |
import traceback | |
LOGGER = logging.getLogger(__name__) | |
OlderNewer