(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
if [ ! -f /tmp/.X5-lock ]; then /usr/bin/Xvfb :5 -ac -screen 0 1024x768x8 & fi | |
export DISPLAY=:5.0 # firefox needs this to know where to find a display to run on | |
java -jar /opt/selenium/selenium-server-standalone-2.26.0.jar > /dev/null 2>&1 & |
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Run this from the commandline: | |
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4 | |
var page = require('webpage').create(), | |
address = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279', | |
duration = 3, // duration of the video, in seconds | |
framerate = 24, // number of frames per second. 24 is a good value. | |
counter = 0, | |
width = 500, | |
height = 500; |
default: | |
extensions: | |
Behat\MinkExtension: | |
base_url: http://localhost:8000 | |
default_session: selenium2 | |
selenium2: | |
browser: chrome | |
wd_host: http://127.0.0.1:4444/wd/hub | |
capabilities: | |
chrome: |
import { JWE, JWK, JWS } from 'node-jose' | |
import fs from 'fs' | |
import { join } from 'path' | |
import jwkToPem from 'jwk-to-pem' | |
import jwt from 'jsonwebtoken' | |
const certDir = '.cert' | |
const keystoreFile = join(certDir, 'keystore.json') | |
const raw = { | |
iss: 'test', |
Let's assume we have following line in our HA proxy file:
reqrep ^([^\ :]*)\ /api/v1/api-name/(.*) \1\ /staging/path-name/\2
Here is our sample domain:
https://example.com/api/v1/api-name/
The goal here is to rewrite /api/v1/api-name/
to /staging/path-name/
leaving anything else unchanged.
Breaking the Regex and understanding in parts:
There are basically 3 parts in the regex: