Here is how the profile page should look
| Key | Value |
|---|
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
| <?php | |
| // https://laravel.io/forum/09-23-2014-how-to-support-http-byte-serving-in-file-streams | |
| // Provide a streaming file with support for scrubbing | |
| private function streamFile( $contentType, $path ) { | |
| $fullsize = filesize($path); | |
| $size = $fullsize; | |
| $stream = fopen($path, "r"); | |
| $response_code = 200; | |
| $headers = array("Content-type" => $contentType); | |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
| <?php | |
| function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { | |
| static $filesize = null; | |
| switch ($notification_code) { | |
| case STREAM_NOTIFY_RESOLVE: | |
| case STREAM_NOTIFY_AUTH_REQUIRED: | |
| case STREAM_NOTIFY_COMPLETED: | |
| case STREAM_NOTIFY_FAILURE: |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
| <!-- when.js Promises implementation --> | |
| <script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
| <!-- Unit testing and mocking framework --> | |
| <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |
| import random | |
| import math | |
| import timeit | |
| import matplotlib.pyplot as plt | |
| timeBubble = [] | |
| timeSelection = [] | |
| timeInsertion = [] | |
| timeQuick = [] | |
| timeMerge = [] |