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
version: '2' | |
services: | |
djangoapp: | |
container_name: djangoapp_python | |
build: | |
context: . | |
dockerfile: docker/djangoapp/Dockerfile | |
command: gunicorn gaz.wsgi:application --bind 0.0.0.0:8000 | |
restart: always |
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 theme: Material Arc Dark [https://plugins.jetbrains.com/plugin/8006-material-theme-ui/] | |
Code theme: Monokai Sublime Text 3 [http://color-themes.com/?view=theme&id=563a1a7680b4acf11273ae94] | |
Font: Source Code Pro | |
Plugins: | |
- CodeGlance | |
- .env | |
Settings: | |
- Password: In KeePass |
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
// Version 1.0+ | |
export const leaflet_russian = () => { | |
L.drawLocal = { | |
draw: { | |
toolbar: { | |
actions: { | |
title: 'Прекратить рисование',//'Cancel drawing', | |
text: 'Отмена' | |
}, | |
finish: { |
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
axios.interceptors.response.use( | |
response => response, | |
error => { | |
const originalRequest = error.config; | |
// EXPIRED TOKEN | |
if (error.response.status === 401 && error.response.data.code === "token_not_valid") { | |
originalRequest._retry = true; | |
store.dispatch('AUTH_REFRESH_TOKEN', { |
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
#~ | |
let a = { | |
meta: { | |
requiresAuth: true, | |
userAuth: true, | |
adminAuth: true | |
} | |
}; |
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
<?php | |
$arr = [ | |
[ | |
'cat' = > [ | |
'id' => 0, | |
'name' => 'Cat1' | |
], | |
'posts':[ | |
[ | |
'id': 1, |
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/python | |
import os | |
import re | |
import subprocess | |
# 0 - sub | |
# 1 - headphones | |
status =0 | |
regex = r": values=(.+)" |
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
#Insall Ajenti ubuntu 18.04 | |
apt-get update | |
wget http://repo.ajenti.org/debian/key -O- | apt-key add - | |
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list | |
apt-get update | |
# install python imaging | |
apt upgrade | |
apt-get install python-pillow | |
cd ~ | |
wget http://security.ubuntu.com/ubuntu/pool/universe/p/pillow/python-imaging_4.1.1-3build2_all.deb |
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
var cheerio = require('cheerio'), | |
needle = require('needle'), | |
tress = require('tress'), | |
resolve = require('url'), | |
fs = require('fs'); | |
var targetURL = 'https://icobench.com/icos'; | |
var results = []; | |
var get_data = function (url, callback) { | |
needle.get(url, function (err, res) { |
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
<?php | |
class Shortcoder_Admin{ | |
private static $pagehook = 'settings_page_shortcoder'; | |
public static function init(){ | |
// Add menu | |
add_action( 'admin_menu', array( __class__, 'add_menu' ) ); |