- https://github.com/toughdeveloper/create-react-native-app-web
- https://github.com/raarts/expo-react-native-web
- Write once, run anywhere with Create React Native App and react-native-web
- React Native Electron is a project that seeks to extend RNW for Electron, but it is still in early stages of development.
- React Native for Web (RNW) is a Javascript wrapper that allows one to deploy a React Native app in a web page. The project is relatively new, but appears to be reaching maturity. There is a demo page where one can view the components and verify that they are working.
This file contains 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
"""Decorator to gzip Respone payload | |
Obtained from http://kb.sites.apiit.edu.my/knowledge-base/how-to-gzip-response-in-flask/ | |
Example use case: | |
@gzipped | |
def get_data(): | |
return response | |
""" |
This file contains 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 bash | |
# Make CPAN package. | |
# Usage: mkcpanpkg $dirname | |
# Run this in the parent directory of $dirname. | |
# $dirname must be a Git repository. | |
# It will create a file $dirname-$version.tar.gz containing all files tracked by Git. | |
function modname() { | |
perl -e "print join(q{::}, split(/-/, qw{$1}))" |
This file contains 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
#https://gist.github.com/tlowrimore/5162327 | |
#http://stackoverflow.com/a/15413611/270511 | |
module ActiveRecord::UnionScope | |
def self.included(base) | |
base.send :extend, ClassMethods | |
end | |
module ClassMethods | |
def union_scope(*scopes) |
This file contains 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
<?php | |
App::uses('AnnouncementsController', 'Controller'); | |
class MockAnnouncementsController extends AnnouncementsController { | |
var $name = 'Announcements'; | |
var $autoRender = false; | |
/* | |
function redirect($url, $status = null, $exit = true) { | |
$this->redirectUrl = $url; |
This file contains 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
const path = require('path') | |
module.exports = { | |
target: 'web', | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'dist'), | |
publicPath: 'dist', | |
library: 'Alc', | |
libraryTarget: 'umd', |
This file contains 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
const path = require('path') | |
module.exports = { | |
target: 'web', | |
entry: { | |
app: ['./demo/index.jsx'] | |
}, | |
devServer: { | |
contentBase: './demo/', | |
}, |
This file contains 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/python | |
import gi | |
import sys | |
import threading | |
import time | |
from gi.repository import GObject | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GstController, GLib | |
def get_alpha_controller(pad): |
This file contains 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
2017-03-16 20:45:04,864, hls.py, DEBUG, hls.py, 72, videomixer name=mixer sink_0::zorder=0 sink_1::zorder=99 | |
! videoconvert | |
! x264enc | |
! mpegtsmux name=muxer | |
! hlssink playlist-root=/hls-test | |
playlist-location=/tmp/hlsstreams/hls-test/playlist.m3u8 | |
location=/tmp/hlsstreams/hls-test/seg%05d.ts | |
playlist-length=999 | |
max-files=999 | |
target-duration=3 |
This file contains 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/python | |
import sys | |
import threading | |
import time | |
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject | |
from gi.repository import Gst, GstController, GLib |
NewerOlder