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
| openssl genrsa 1024 > ssl.key | |
| openssl req -new -x509 -nodes -sha1 -days 365 -key ssl.key > ssl.cert |
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
| context = ('ssl.cert', 'ssl.key') | |
| app.run(host='0.0.0.0', port=80, ssl_context=context) |
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 sys, getopt | |
| from basic_auth import app | |
| def main(argv): | |
| user = '' | |
| password = '' | |
| try: | |
| opts, args = getopt.getopt(argv,"u:p:") | |
| except getopt.GetoptError: |
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 myApp = angular.module('myApp', []); | |
| myApp.controller('SRChannelsController', ['$scope', '$http', function($scope, $http) { | |
| $scope.header = 'Radio channels on Sveriges Radio'; | |
| $scope.filter = "Riks"; | |
| $scope.filterChanged = function() { | |
| getChannelsInfo($scope.filter); | |
| }; |
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
| <!DOCTYPE html> | |
| <html ng-app="myApp"> | |
| <head> | |
| <script data-require="angular.js@1.4.8" data-semver="1.4.8" src="https://code.angularjs.org/1.4.8/angular.js"></script> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" /> | |
| <script src="SRController.js"></script> | |
| <link rel="stylesheet" href="style.css" /> | |
| </head> |
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
| int maxBarHeight = 600; | |
| int barWidth = 400; | |
| //IArduinoIntegration arduino = new ArduinoFakeIntegration(); | |
| IArduinoIntegration arduino = new ArduinoIntegration(this); | |
| // A list with bars to draw | |
| // Specify the matching Arduino analog pin number and a color for the bar that should represent the input voltage | |
| BarSpec[] barSpecs = { new BarSpec(0, color(150,150,20)), | |
| new BarSpec(1, color(20,100,20)), |
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 processing.core.PApplet; | |
| import processing.serial.*; | |
| import cc.arduino.*; | |
| public class ArduinoIntegration implements IArduinoIntegration { | |
| // Change this so that it matches the usb device connected to the Arduino | |
| String arduinoUSBDeviceName = "/dev/tty.usbmodem1421"; | |
| Arduino arduino; |