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
| <Page | |
| x:Class="SmoothStreamingWP81.MainPage" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="using:SmoothStreamingWP81" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| mc:Ignorable="d" | |
| Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> |
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
| using Microsoft.Media.AdaptiveStreaming; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.InteropServices.WindowsRuntime; | |
| using Windows.Foundation; | |
| using Windows.Foundation.Collections; | |
| using Windows.UI.Xaml; | |
| using Windows.UI.Xaml.Controls; |
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
| public static function TicksToTime($tick){ | |
| return floor(($ticks - 621355968000000000) / 10000000); | |
| } | |
| public static function TimeToTicks($time){ | |
| return number_format(($time * 10000000) + 621355968000000000 , 0, ’.’, “); |
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
| # view log | |
| $ sudo grep cron /var/log/syslog | |
| # restart | |
| $ sudo service cron restart | |
| # edit crontab | |
| $ crontab -e | |
| # list crontab |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Microsoft.WindowsAzure.Diagnostics; | |
| using Microsoft.WindowsAzure.ServiceRuntime; | |
| using Microsoft.WindowsAzure.Storage; |
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 fs = require('fs'); | |
| var path = require('path'); | |
| var mime = require('mime'); | |
| var FileInfo = function (fullPath) { | |
| if (fs.existsSync(fullPath)) { | |
| this.fullPath = fullPath; | |
| var stats = fs.statSync(fullPath); | |
| this.size = stats["size"]; | |
| this.name = path.basename(fullPath); |
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 rest = require('restler'); | |
| var FileInfo = require('./FileInfo.js'); | |
| var file = new FileInfo([FULL PATH OF YOUR FILE]); | |
| rest.post([API_ULR], { | |
| multipart: true, | |
| data: { | |
| file: rest.file(file.fullPath, file.name, file.size, null, file.contentType) | |
| }, |
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 EventEmitter = require('events').EventEmitter; | |
| var doSomething = function () { | |
| var result = new EventEmitter(); | |
| setTimeout(function () { | |
| result.emit('success', 'Hello World!'); | |
| }, 1000); | |
| return result; | |
| }; |
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
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
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
| up vote | |
| 25 | |
| down vote | |
| accepted | |
| After more research it seems like another (possibly better way) to answer this would be to setup the www folder like so. | |
| sudo usermod -a -G developer user1 (add each user to developer group) | |
| sudo chgrp -R developer /var/www/site.com/ so that developers can work in there | |
| sudo chmod -R 2774 /var/www/site.com/ so that only developers can create/edit files (other/world can read) |