<!-- Normalize css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
<!-- Google Fonts: Source Sans Pro and Open Sans -->
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
# file: /etc/nginx/sites-available/example.com | |
# nginx configuration for example.com | |
server { | |
listen 80; | |
server_name example.com; | |
access_log /var/www/example.com/logs/access.log; | |
error_log /var/www/example.com/logs/error.log; | |
# pass root to django |
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
# Configuration assumes use of Let's Encrypt | |
# Site is ONLY served through HTTPS. | |
# Site is served through .example.com and www.example.com | |
# Leo N. | |
server { | |
listen 443 ssl; | |
server_name example.com www.example.com; | |
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; |
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
# | |
# Wide-open CORS config for nginx | |
# From: https://enable-cors.org/server_nginx.html | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
# | |
# Custom headers and headers various browsers *should* be OK with but aren't |
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 | |
# Get name of the site directory | |
# Create index.html | |
# Create css, js, and img sub-directories | |
# Create css and js files inside the respective folders | |
# Usage: ./startsite.sh SITE_PROJECT_NAME | |
# Tradução [Português] | |
# SITE vai armazenar o nome do argumento passado por meio do terminal. Esse nome será o nome do directório. | |
# Depois de criar o directório, entrasse no mesmo para a criação das pastas necessárias: CSS, JS, and IMG... |
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 | |
# Usage: ./djangoproject.sh PROJECT_NAME APP_NAME1 APP_NAME2 APP_NAME3 | |
# This script is written to handle up to three(3) applications. It can definitely be extended further... | |
SITE=$1 | |
firstapp=$2 | |
secondapp=$3 | |
thirdapp=$4 |
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 | |
# Requirements: Python3.6, Django and Git | |
# A handy script for creating Django Projects and their respective applications | |
# Usage: ./djangoproject.sh PROJECT_NAME APP_NAME1 APP_NAME2 APP_NAME3 APP_NAME4 | |
SITE=$1 | |
firstapp=$2 | |
secondapp=$3 | |
thirdapp=$4 | |
fourthapp=$5 |
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
""" | |
EventBrite.py | |
By Leo N. | |
An implementation of the EventBrite API. | |
Requirements: Python 3+, Internet, EventBrite API Key. | |
-------------------- | |
Structure of the JSON for an event object: |
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 | |
# Requirements: Python, Bottle | |
# A script that automates the creation of a bottle app. | |
SITE=$1 | |
print_usage(){ | |
echo "usage: newbottle [appname]" | |
echo " newbottle -h" | |
echo " newbottle -st" |
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 | |
# Requirements: No special requirements. | |
# Usage: ./newsite.sh NAME_OF_SITE | |
SITE=$1 | |
HELP="-h" | |
print_usage(){ | |
echo "usage: newsite [nameofsite]" | |
echo " newsite -h" |
OlderNewer