$ npm install -g create-react-app
$ create-react-app my-app
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 | |
# set values for certificate DNs | |
# note: CN is set to different values in the sections below | |
ORG="000_Test_Certificates" | |
# set values that the commands will share | |
VALID_DAYS=360 | |
CA_KEY=ca.key | |
CA_CERT=ca.crt |
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
# project-repo/app/settings/.env-example | |
# | |
# DJANGO | |
# | |
SITE_HOST=localhost:8000 | |
USE_SSL=False | |
ALLOWED_HOSTS=localhost,127.0.0.1 | |
SECRET_KEY=asdasd | |
DEBUG=true # never on production, will cause settings including api keys to leak | |
DJANGO_LOG_LEVEL=DEBUG |
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 aiohttp import web | |
from threading import Thread | |
import asyncio | |
import time, uuid | |
loop = asyncio.get_event_loop() | |
def long_blocking_thing(sleep): | |
time.sleep(sleep) | |
return 42 |
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
version: '2' | |
services: | |
db: | |
image: postgres:9.4 | |
restart: always | |
environment: | |
- POSTGRES_USER=odoo | |
- POSTGRES_PASSWORD=odoo | |
odoo: | |
image: odoo:11 |
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
#Update system & reboot | |
sudo apt update && sudo apt -y upgrade | |
sudo reboot | |
#Install Asterisk 16 LTS dependencies | |
sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev | |
#Add universe repository and install subversio | |
sudo add-apt-repository universe | |
sudo apt update && sudo apt -y install subversion |
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 | |
import gzip | |
import os | |
import sys | |
import re | |
INPUT_DIR = "nginx-logs" | |
lineformat = re.compile(r"""(?P<ipaddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?P<dateandtime>\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\] ((\"(GET|POST) )(?P<url>.+)(http\/1\.1")) (?P<statuscode>\d{3}) (?P<bytessent>\d+) (["](?P<refferer>(\-)|(.+))["]) (["](?P<useragent>.+)["])""", re.IGNORECASE) |
#JSSIP with Catapult API ##Prerequisites
- Register for a Catapult (Bandwidth Application Platform) account here
- Register a SIP domain
- Create an endpoint/user
- If you want to make calls to the PSTN (normal phones) you will need a server to handler events from Catapult
- Make phone calls