running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
// <div [innerHTML]="your.value | sanitizeHtml" ></div> | |
import { Pipe, PipeTransform } from '@angular/core'; | |
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | |
@Pipe({name: 'sanitizeHtml'}) | |
export class SanitizeHtmlPipe implements PipeTransform { | |
constructor(private _sanitizer:DomSanitizer) { | |
} | |
transform(v:string):SafeHtml { |
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
const { Response, Headers, Request } = require('whatwg-fetch'); | |
global.Response = Response; | |
global.Headers = Headers; | |
global.Request = Request; | |
global.console = { | |
log: () => {}, | |
warn: () => {}, | |
}; | |
global.fetch = require('jest-fetch-mock'); |
I use PostgreSQL via the psql client. If you use a different client (eg. pgAdmin, etc.), I don't know how much will translate over.
One nice difference between psql and mysql (cli) is that if you press CTRL+C, it won't exit the client.
psql -U postgres
-import { Text, View, ListView } from 'react-native'; | |
+import { Text, View, FlatList } from 'react-native'; | |
import style from './styles'; | |
import listData from './listData'; | |
class App extends Component { | |
- constructor(props) { | |
- super(props); |
daemon | |
nscache 65536 | |
users mylogin:CL:mypassword | |
log /var/log/3proxy.log D | |
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T" | |
rotate 30 | |
flush | |
auth strong |
/** | |
* Install and enable the rabbitmq_delayed_message_exchange plugin as described by Alvaro Videla in this blogpost: | |
* https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/ | |
*/ | |
const amqp = require('amqplib'); | |
const exchange = 'yourExchangeName'; | |
const queue = 'yourQueueName'; | |
const queueBinding = 'yourQueueBindingName'; | |
// Message consumer |
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation | |
moduleName:@"GORUCK" | |
initialProperties:nil | |
launchOptions:launchOptions]; | |
// JG: Configure the scaled image for the background | |
CGRect bounds =[UIScreen mainScreen].bounds; | |
UIGraphicsBeginImageContext(bounds.size); |