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 { | |
| listen 443 ssl; | |
| server_name xxx.xx.io | |
| ssl on; | |
| ssl_certificate /etc/asterisk/certs/xxx.io.pem; | |
| ssl_certificate_key /etc/asterisk/certs/xxx.io.key; | |
| ssl_session_timeout 5m; |
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
| """pytest plugin for testing django projects | |
| This plugin handlers creating and destroying the test environment and | |
| database. It is only enabled when DJANGO_SETTINGS_MODULES is set in | |
| either the environment, the ini file or a conftest.py file. In case | |
| of conftest.py files the django modules are only imported at the last | |
| possible moment and it is also possible to test multiple sites | |
| (multiple django settings modules) in one py.test process. | |
| Similar to Django's TestCase, a transaction is started and rolled back |
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
| import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import styles from './index.sass'; | |
| class TextField extends Component { | |
| render () { | |
| const { type, placeholder, ...rest} = this.props; | |
| return ( | |
| <input |
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
| pip install watchdog -U | |
| # now there is a command called "watchmedo", you'll like it... | |
| # in terminal #1, run: | |
| gunicorn app:myapp --pid=gunicorn.pid | |
| # in terminal #2, run: | |
| watchmedo shell-command \ | |
| --patterns="*.py;*.html;*.css;*.js" \ | |
| --recursive \ |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
| #!/usr/bin/env python | |
| """ | |
| Very simple HTTP server in python. | |
| Usage:: | |
| ./dummy-web-server.py [<port>] | |
| Send a GET request:: | |
| curl http://localhost |
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
| from django.conf.urls import patterns, include, url | |
| from django.contrib.auth.decorators import login_required | |
| from django.contrib.admin.views.decorators import staff_member_required | |
| from django.contrib import admin | |
| from application.views import ApplicationFormView, ApplicationListView | |
| admin.autodiscover() | |
| urlpatterns = patterns('', |
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 backendData = [ | |
| { | |
| "title":"Section 1", | |
| "content":"Our content for the section 1" | |
| }, | |
| { | |
| "title":"Section 2", | |
| "content":"Our content for the section 2" | |
| }, | |
| { |

