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 | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls-gpu.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |
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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class EnsureQueueWorkerIsRunning extends Command | |
{ | |
protected $signature = 'queue:checkup'; | |
protected $description = 'Ensure that the queue worker is running.'; |
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 | |
if (! function_exists('to_sentence')) { | |
function to_sentence(array $parts, $connector = ', ', $finally = ' and '): string | |
{ | |
switch (count($parts)) { | |
case 0: | |
return ''; | |
case 1: | |
return reset($parts); |
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/sh | |
# | |
# Iconizer shell script by Steve Richey ([email protected]) | |
# | |
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file. | |
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets | |
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject | |
# | |
# Requires ImageMagick: http://www.imagemagick.org/ |
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
desc "remotely console" | |
task :console, :roles => :app do | |
input = '' | |
run "cd #{current_path} && rails console #{ENV['RAILS_ENV']}" do |channel, stream, data| | |
next if data.chomp == input.chomp || data.chomp == '' | |
print data | |
channel.send_data(input = $stdin.gets) if data =~ /:\d{3}:\d+(\*|>)/ | |
end | |
end |