This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>React Local</title> | |
<script type="application/javascript" src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script> | |
<script type="application/javascript" src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
Hello | |
<script> | |
function getLang() |
This file contains hidden or 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
# for item in graph_data: | |
# item.data['group'] = model_name | |
# arr_data.append(item.data) | |
arr_data = [dict(item.data, **{'group':model_name}) for item in graph_data] |
This file contains hidden or 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
# SERVER SIDE | |
cd /opt/git | |
mkdir project.git | |
cd project.git | |
git --bare init | |
#CLIENT SIDE | |
cd myproject | |
git init | |
git add . |
This file contains hidden or 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
//TODO using regexp to add '+' for every word in string | |
value = value.replace(/(\w+)/g,"+$1"); |
This file contains hidden or 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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'user171030', | |
'USER': 'user171030', | |
'PASSWORD': 'user171030', | |
'HOST': 'localhost', | |
'PORT': '5432', | |
# for testing views | |
'TEST': { |
This file contains hidden or 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
header = request.META.get('HTTP_AUTHORIZATION') | |
if header: | |
token = header.split(' ')[1] | |
print(token_backend.decode(token, verify=True)) |
This file contains hidden or 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
token = sub('Bearer ', '', request.META.get('HTTP_AUTHORIZATION', None)) |
This file contains hidden or 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
{ | |
'query': { | |
'bool': { | |
'should': [ | |
{ | |
'match': { | |
'value': '4352435342532' | |
} | |
}, | |
{ |
This file contains hidden or 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
GET /_search | |
{ | |
"query": { | |
"match_all": {} | |
} | |
} |