I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI
. uWSGI
talks tonginx
.
<?xml version="1.0" encoding="UTF-8" ?> | |
<billing-log> | |
<log-start-date>2018-01-15T10:00:00-00:00</log-start-date> | |
<player-name>some-player</player-name> | |
<schema-version>1</schema-version> | |
<player-uuid>2b51f999-a4d3-30dc-a357-f0ee60c34b79</player-uuid> | |
<log-end-date>2018-01-15T10:59:59.999-00:00</log-end-date> | |
<entry><in>2018-01-15T09:59:53.457-00:00</in><out>2018-01-15T10:00:04.486-00:00</out><duration>11.029</duration><channel>xx</channel><frame>Main</frame><mediaitem-path>some_media_item.mp4</mediaitem-path></entry> | |
<entry><in>2018-01-15T10:59:42.290-00:00</in><out>2018-01-15T10:59:53.419-00:00</out><duration>11.123</duration><channel>xx</channel><frame>Main</frame><mediaitem-path>some_media_item.mp4</mediaitem-path></entry> | |
</billing-log> |
(defn parse-second | |
"" | |
[time-string] | |
(str (time/second (time-coerce/from-string time-string)))) | |
(defn parse-minute | |
"" | |
[time-string] | |
(str (time/minute (time-coerce/from-string time-string)))) |
#!/usr/bin/env sh | |
# Stored at: https://gist.github.com/4452136 | |
# Assumes the given path points to a FLV file with MP4 video. | |
# Use ffmpeg to repackage the file. | |
ffmpeg -i "$1" -acodec copy -vcodec copy "$1".mp4 | |
# old version: | |
# Not used anymore as VLC seems to have a bug that creates broken |
(ns example.virtualized | |
(:require cljsjs.react-virtualized | |
cljsjs.react | |
[cljs.spec :as s] | |
[re-frame.core :as re-frame])) | |
(def ArrowKeyStepper* (js/React.createFactory js/ReactVirtualized.ArrowKeyStepper)) | |
(def AutoSizer* (js/React.createFactory js/ReactVirtualized.AutoSizer)) | |
(def Collection* (js/React.createFactory js/ReactVirtualized.Collection)) |
(ns datatable.core | |
(:require [reagent.core :as reagent] | |
[cljsjs.fixed-data-table])) | |
(def Table (reagent/adapt-react-class js/FixedDataTable.Table)) | |
(def Column (reagent/adapt-react-class js/FixedDataTable.Column)) | |
(defn gen-table | |
"Generate `size` rows vector of 4 columns vectors to mock up the table." | |
[size] |
(defn actions [array-of-funcs] | |
(doseq [func array-of-funcs] (func))) |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> | |
<dependency> | |
<dependentAssembly> | |
<assemblyIdentity | |
type="win32" | |
name="Microsoft.Windows.Common-Controls" | |
version="6.0.0.0" processorArchitecture="*" |
/* | |
Document: app.js | |
Author: Rustheme | |
Description: UI Framework Custom Functionality (available to all pages) | |
*/ | |
var App = function() { | |
/** | |
* CORE UI FUNCTIONALITY |
def my_func(): | |
return "embedding?" |