Skip to content

Instantly share code, notes, and snippets.

View btsuhako's full-sized avatar

Blake btsuhako

View GitHub Profile
@james-tindal
james-tindal / csvMessage
Last active January 3, 2021 03:24
Send multiple iMessages from CSV and message template. Will prompt for .csv and .txt template files.
#!/bin/sh
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit
on run
set pathCSVFile to (choose file with prompt "Select the CSV file" of type "csv")
set strCSV to read pathCSVFile
set pathTemplateFile to (choose file with prompt "Select the message template" of type "txt")
set messageTemplate to read pathTemplateFile
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active June 21, 2024 11:40
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@jschr
jschr / 01-migrate-db.config
Last active February 7, 2020 07:55
.ebextension file and package.json for migrating a db with knex migrate cli and a single docker container beanstalk app
container_commands:
migrate_db:
command: >
docker run -e "DB_HOST=${DB_HOST}" -e "DB_PORT=${DB_PORT}" -e "DB_NAME=${DB_NAME}" -e "DB_USER=${DB_USER}" -e "DB_PASSWORD=${DB_PASSWORD}" aws_beanstalk/staging-app:latest npm run db:migration:run
leader_only: true
@vcastellm
vcastellm / ecs-run
Last active April 15, 2024 17:55
Run task and wait for result in AWS ECS
#!/usr/bin/env bash
set -e
function usage() {
set -e
cat <<EOM
##### ecs-run #####
Simple script for running tasks on Amazon Elastic Container Service
One of the following is required:
Required arguments: