Skip to content

Instantly share code, notes, and snippets.

Louis Borsu satblip

Block or report user

Report or block satblip

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bennylope /
Created Apr 22, 2016 — forked from webkader/
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.

chrisgilbert / gist:58f57c82f74162ed5c0f
Last active Oct 17, 2016
Run Ansible or Ansible-Playbook from Rundeck
View gist:58f57c82f74162ed5c0f
# Interpret whether the input needs to go to ansible, or ansible-playbook and run appropriately
# First update the git repos for each project
View 01papertrail.config
# IMPORTANT: this example is potentially out of date. The latest version can be found here:
# See
# Usage:
# - replace <VERSION> with the version of remote_syslog2 you want to use. Example: .../download/v0.14/remote_syslog_linux_amd64.tar.gz
# - replace <YOUR-TRACKED-FILES> with the files you want to monitor for new log lines. Example: - /var/log/httpd/access_log
# - replace <YOUR-APP-NAME> with the name of the application
# - replace <YOUR-LOG-DESTINATION> and <YOUR-PORT-NUMBER> with the values shown under log destinations:
emad-elsaid / matrix.rb
Created Mar 16, 2014
Create Matrix Like screen using Ruby
View matrix.rb
#!/usr/bin/env ruby
require 'gosu' # gem install gosu
$width, $height = 200, 200
$number_of_v_lines,$number_of_h_lines = 10, 10
$chars = ('a'..'z').to_a
class Entity
def initialize(x,y,vel, win)
@pos, @vel = {x:x, y:y}, vel
emad-elsaid / gist-download.rb
Created Mar 14, 2014
Download your latest 30 Github Gists to local directory
View gist-download.rb
#!/usr/bin/env ruby
require 'open-uri'
require 'json'
print 'Github Username: '
username = gets.chomp
# get gists
puts 'Downloading gists list'
gists_str = open("{username}/gists").read
emad-elsaid / monitor-size.rb
Last active Aug 29, 2015
monitor directories sizes and take an action if one of them exceeded
View monitor-size.rb
#!/usr/bin/env ruby
seconds_to_wait = 1*60*60 # 1 hour
$directories_to_watch = {
'/Users/blaze/Desktop/folder1' => 1*1024, #bytes
'/Users/blaze/Desktop/folder2' => 1*1024 #bytes
def alert_size_exceeded directory, size
# you can replace this by an sending an email
emad-elsaid / imagize.rb
Created Mar 12, 2014
highlight code and convert it to image using ruby
View imagize.rb
#!/usr/bin/env ruby
require 'pygmentize' # gem install pygmentize
require 'selenium-webdriver' # gem install selenium-webdriver
exit unless code_path = ARGV.shift
file_path = File.absolute_path 'code.html'
image_path = File.absolute_path 'code_image.png'
code = Pygmentize.process, :ruby
html = <<-EOT
emad-elsaid / markdown.rb
Created Mar 9, 2014
Everytime i write markdown and commit i find error, so i solved the problem ;)
View markdown.rb
#!/usr/bin/env ruby
# gem install sinatra --no-document
# gem install github-markdown --no-document
require 'sinatra'
require 'github/markdown'
set :port, 3000
get '/' do
<!DOCTYPE html>
emad-elsaid / text-generator.rb
Created Mar 8, 2014
generate random string from a canonical for, useful for software responding like humans
View text-generator.rb
#!/usr/bin/env ruby
# generate a single sentence from a canonical form
# canonical sentence is a multi sentences combined in one
# form, generator will generate a sentence from it randomly
# based on the form, for example:
# "Hello [Emad|Elsaid]" , may generate "Hello Emad" or
# "Hello Elsaid" the result is random.
# also you could nest [] inside each other to gain a multi level
# canonical sentence example:
# "[[Hi|Hello] [Emad|elsaid] | good [morning|night] sir]"
emad-elsaid / gmail2tumblr.rb
Created Mar 6, 2014
gmail to tumblr posting script
View gmail2tumblr.rb
#!/usr/bin/env ruby
require 'mail' # gem install mail --no-document
# Credit to :
def ask question
print "#{question} ? : "
You can’t perform that action at this time.