Skip to content

Instantly share code, notes, and snippets.

View jayroh's full-sized avatar
😎

Joel Oliveira jayroh

😎
View GitHub Profile
@jayroh
jayroh / custom_plan.rb
Created November 7, 2013 22:06
personal setup for setting up a rails engine with zeus and a customized tmux session
require 'zeus/rails'
ROOT_PATH = File.expand_path(Dir.pwd)
ENV_PATH = File.expand_path('spec/dummy/config/environment', ROOT_PATH)
BOOT_PATH = File.expand_path('spec/dummy/config/boot', ROOT_PATH)
APP_PATH = File.expand_path('spec/dummy/config/application', ROOT_PATH)
ENGINE_ROOT = File.expand_path(Dir.pwd)
ENGINE_PATH = File.expand_path('lib/thredded/engine', ENGINE_ROOT)
class CustomPlan < Zeus::Rails
# This configuration was generated by `rubocop --auto-gen-config`.
# The point is for the user to remove these configuration records
# one by one as the offences are removed from the code base.
AllCops:
Excludes:
- !ruby/regexp /\/db\/schema\.rb$/
AccessorMethodName:
Enabled: true
# spec_helper.rb
RSpec.configure do |config|
# ...
config.include(MyWebsite::Helpers)
end
# spec/support/my_website/helpers.rb
Process: sample-cdq [72063]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/A1AC494C-7650-4668-9B3D-BB67D2F1AECA/data/Applications/7D8CC83D-03DB-4899-B162-E906D72EE9A0/sample-cdq.app/sample-cdq
Identifier: sample-cdq
Version: 0
Code Type: X86 (Native)
Parent Process: launchd_sim [71680]
Responsible: launchd_sim [71680]
User ID: 501
Date/Time: 2014-09-23 10:48:25.198 -0400
$ boot2docker down && boot2docker delete && boot2docker init && boot2docker up
Waiting for VM and Docker daemon to start...
........................ooooooooooooooooooooo
Started.
Writing /Users/joel/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/joel/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/joel/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
@jayroh
jayroh / thredded_tmuxify
Created April 23, 2016 19:55
thredded gem tmuxify
#!/bin/zsh
tmux has-session -t thredded 2>/dev/null
if [ "$?" -eq 1 ] ; then
echo "Project not found. Creating and configuring."
# Set up primary window
tmux new-session -d -s thredded
tmux rename-window "vim"
@jayroh
jayroh / ffmpeg-watermark.md
Created July 8, 2020 14:46 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.