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 /** @noinspection ALL */ | |
namespace App\Console\Commands; | |
use Fhaculty\Graph\Edge\Directed; | |
use Fhaculty\Graph\Vertex; | |
use Graphp\GraphML\Loader; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Carbon; | |
use Illuminate\Support\Str; |
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
#!/bin/bash | |
# run with ./add-subtitles.sh video.mp4 subtitles.srt output.mp4 | |
VIDEO_FILE=$1 | |
SUBTITLE_FILE=$2 | |
OUTPUT_FILE=$3 | |
echo "Muxing " $VIDEO_FILE " and " $SUBTITLE_FILE " into " $OUTPUT_FILE "..." | |
ffmpeg -i $VIDEO_FILE -i $SUBTITLE_FILE -c:a copy -c:v copy -c:s mov_text $OUTPUT_FILE |
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 | |
define( 'WP_POST_REVISIONS', false ); | |
define( 'BASE_URL', 'YOUR_GHOST_URL' ); | |
include './wp-load.php'; | |
if ( ! function_exists( 'wp_crop_image' ) ) { | |
include( ABSPATH . 'wp-admin/includes/image.php' ); | |
} |
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
function downloadFile(url, filename) { | |
axios.get(url, { responseType: 'arraybuffer' }).then(res => { | |
let data = btoa(new Uint8Array(res.data).reduce((data, byte) => data + String.fromCharCode(byte), '')) | |
cep.fs.writeFile(filename, data, this.cep.encoding.Base64) | |
}) | |
} |
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
{ | |
"name": "barooney/ftp-dropbox-migrator", | |
"description": "Migrates a full FTP server to a Dropbox", | |
"type": "console", | |
"require": { | |
"league/flysystem": "^1.0", | |
"league/flysystem-dropbox": "^1.0" | |
}, | |
"authors": [ | |
{ |
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
use Schoolm8\Http\Requests; | |
use Illuminate\Support\Facades\Session; | |
use Schoolm8\Http\Controllers\Controller; | |
use Laravel\Socialite\Facades\Socialite; | |
class AuthController extends Controller { | |
public function proxy( Request $request ) { | |
if ( ! $request->oauth_token ) { |