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
| ljf akdsfjsdkfjasldkj |
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 express = require('express'); | |
| var app = express(); | |
| var fs = require('fs'); | |
| app.listen(3000, function() { | |
| console.log("[NodeJS] Application Listening on Port 3000"); | |
| }); | |
| app.get('/api/play/:key', function(req, res) { | |
| var key = req.params.key; |
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
| // Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
| // Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
| var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
| // For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
| var reqUrl = url.parse(req.url, true) | |
| var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
| if (cameraName) { | |
| try { | |
| cameraName = decodeURIComponent(cameraName); |
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 spawn = require("child_process").spawn; | |
| var converter = spawn("gst-launch-0.10", ["filesrc location=/dev/stdin ! decodebin ! audioconvert ! audioresample ! lame ! filesink location=/dev/stdout"]); | |
| converter.stdout.on("data", function(chunk) { | |
| console.log(chunk.toString()); | |
| }); | |
| converter.stderr.on("data", function(chunk) { | |
| console.log("err: ", chunk.toString()); | |
| }); |
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 QtQuick 2.4 | |
| Column { | |
| width: parent.width | |
| height: parent.height | |
| property alias model: columnRepeater.model | |
| Repeater { | |
| id: columnRepeater |
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
| // allows YYYY/M/D and periods instead of slashes | |
| // http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd | |
| /^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/ | |
| // YYYY-MM-DD and YYYY-M-D | |
| // http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript | |
| /^\d{4}\-\d{1,2}\-\d{1,2}$/ | |
| // YYYY-MM-DD | |
| // https://gist.github.com/arth2o/8471150 |
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
Show hidden characters
| { | |
| "compilerOptions": { | |
| /* Basic Options */ | |
| "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
| "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
| // "lib": [], /* Specify library files to be included in the compilation. */ | |
| // "allowJs": true, /* Allow javascript files to be compiled. */ | |
| // "checkJs": true, /* Report errors in .js files. */ | |
| // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ | |
| // "declaration": true, /* Generates corresponding '.d.ts' file. */ |
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
| type ValidSymbol = '#' | '$' | |
| interface GenerateConfig { | |
| symbol: ValidSymbol; | |
| length: number; | |
| } | |
| function generateRandomId (symbol: ValidSymbol, length: number): string | |
| function generateRandomId (options: GenerateConfig): string | |
| function generateRandomId (optionsOrSymbol: any): string { |
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
| type ValidSymbol = '#' | '$' | |
| interface GenerateConfig { | |
| symbol: ValidSymbol; | |
| bar: number; | |
| } | |
| function generateRandomId (symbol: ValidSymbol, bar: number): string | |
| function generateRandomId (options: GenerateConfig): string | |
| function generateRandomId (optionsOrSymbol: any): string { |
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
| # basic commands | |
| a = add | |
| b = branch | |
| cp = cherry-pick | |
| s = status -s | |
| cl = clone | |
| ci = commit | |
| ck = checkout | |
| br = branch | |
| diff = diff --word-diff |