Language | Lines of Code |
---|---|
HTML | 70 |
Javascript | 170 |
CSS | 5 |
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
var path = require('path'); | |
var url = require('url'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var write_file; | |
//what global variable do we have? | |
var complete = false; | |
var content_length = 0; | |
var downloaded_bytes = 0; |
Service Workers | Web Workers | |
---|---|---|
Good for | Offline | Concurrency |
Life span | Independent | Same as tab |
Tab control | One for all tabs | Many per tab |
Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"
This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).
I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)
Main features:
- Django REST APIs
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
/* https://css-tricks.com/snippets/css/system-font-stack/ */ | |
/* System Fonts as used by GitHub */ | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
} | |
/* System Fonts as used by Medium and WordPress */ | |
body { | |
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
} |
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
# EditorConfig is awesome: http://EditorConfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_style = tab | |
indent_size = tab | |
tab_width = 4 |
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
#!/bin/bash | |
# Add your backup dir location, password, mysql location and mysqldump location | |
DATE=$(date +%d-%m-%Y) | |
BACKUP_DIR="$HOME/backup/mysql" | |
MYSQL_USER="root" | |
MYSQL_PASSWORD="***" | |
MYSQL=$(which mysql) | |
MYSQLDUMP=$(which mysqldump) |
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
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<?= $view->render('head') ?> | |
<?php $view->style('custom-uikit', 'theme:css/uikit.min.css') ?> | |
<?php $view->style('theme', 'theme:css/theme.css') ?> | |
<?php $view->style('uikit-slideset', 'theme:css/components/slideset.css') ?> | |
<?php $view->style('uikit-slideshow', 'theme:css/components/slideshow.css') ?> | |
<?php $view->script('theme-jquery', 'theme:app/assets/jquery/dist/jquery.min.js') ?> |
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
#!/bin/bash | |
# Update atom from downloaded deb file | |
rm -f /tmp/atom.deb | |
curl -L https://atom.io/download/deb > /tmp/atom.deb | |
dpkg --install /tmp/atom.deb | |
echo "***** apm upgrade - to ensure we update all apm packages *****" | |
apm upgrade --confirm false | |
atom |