{{SITES_ROOT}}/etc/nginx.conf
/etc/nginx/conf.d/myproj.confs
/etc/nginx/sites-enabled/default
/etc/nginx/sites-available/myconf.conf
ln -s [source] [target]
ln -s /etc/nginx/sites-available/myconf.conf /etc/nginx/sites-enabled/default
#PyBoard
# screen /dev/tty.usbmodem*
# Servo Example
# http://docs.micropython.org/en/latest/pyboard/tutorial/servo.html
import pyb
s1 = pyb.Servo(1) # pin X1
s1.angle(45)
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
# views.py - django app called ajx | |
from django.shortcuts import render, get_object_or_404, redirect, HttpResponse, render_to_response, HttpResponseRedirect | |
from django.core.urlresolvers import reverse | |
from django.contrib.auth import authenticate, login | |
import json | |
def mygetview(request): | |
if request.method == 'GET': |
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
from collections import Counter | |
from random import choice | |
import re | |
class Cup: | |
""" A class defining a cup that will hold the words that we will pull out """ | |
def __init__(self): | |
self.next_word = Counter() # will keep track of how many times a word appears in a cup |
For more comprehensive notes: https://github.com/pebreo/django-notes
# show migrations
./manage.py migrate --list
NewerOlder