Skip to content

Instantly share code, notes, and snippets.

View protrolium's full-sized avatar

Ꮹανiη Ꮐaмвoα protrolium

View GitHub Profile
@bennylope
bennylope / ffmpeg-watermark.md
Created April 22, 2016 23:17 — forked from webkader/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.

@dnlcrl
dnlcrl / caffe+tensorflow+el-capitan.sh
Created January 26, 2016 12:52
fix incompatibility between tensorflow and caffe on OSX 10.11 el capitan, due to the different protobuf versions, installed by brew for caffe and by pip for tf
# follow instructions on http://caffe.berkeleyvision.org/install_osx.html except for protobuf, where you should use --devel and not use --with-python because it is the default behaviour
brew install --devel protobuf #basically you are installing protobuf 3.0, the same checked by pip for tensorflow
# continue with caffe installation, after make all and before make runtest, set the right linking lib location
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/test/test_all.testbin
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/tools/caffe
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 .build_release/lib/libcaffe.so
# run make runtest, if everything is ok, before running make pycaffe set the right linking location for python
install_name_tool -change libcaffe.so.1.0.0-rc3 @rpath/libcaffe.so.1.0.0-rc3 /Users/imac/caffe/python/caffe/_caffe.so
# make pycaffe; cd caffe/python; try to run python >>>impor
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active February 6, 2025 04:44
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@kylemcdonald
kylemcdonald / build-caffe.md
Last active March 26, 2024 05:52
How to build Caffe for OS X.

Theory of Building Caffe on OS X

Introduction

Our goal is to run python -c "import caffe" without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to explain why each step happens.

This page has OS X specific install instructions.

I assume:

@ttscoff
ttscoff / voices.txt
Created April 20, 2015 20:48
Voices available to say command on OS X 10.10.3
# Voices available to `say` on OS X
# "*" indicates new additions since 10.8
Agnes (en_US)
Albert (en_US)
Alex (en_US)
*Alice (it_IT)
*Alva (sv_SE)
*Amelie (fr_CA)
*Anna (de_DE)
@tobek
tobek / get-image-urls.js
Last active March 25, 2025 09:50
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
@smugmug-api-docs
smugmug-api-docs / .gitignore
Last active March 6, 2025 10:44 — forked from chestone/common.py
OAuth 1.0a Example Code for the SmugMug API
ENV
__pycache__
*.json
!example.json
@rodneyrehm
rodneyrehm / anti-keygrabber.user.js
Last active May 26, 2024 17:50
GreaseMonkey: Prevent Web Applications From Grabbing Certain HotKeys
// ==UserScript==
// @name anti key-grabber
// @description Prevent web apps from capturing and muting vital keyboard shortcuts
// @grant none
// @version 1.1
// ==/UserScript==
(function(){
var isMac = unsafeWindow.navigator.oscpu.toLowerCase().contains("mac os x");
unsafeWindow.document.addEventListener('keydown', function(e) {
if (e.keyCode === 116) {
@namklabs
namklabs / hide-on-scroll.jquery.js
Last active October 15, 2023 12:50
fade out and hide a fixed element when you scroll to the bottom of the page (jQuery)
//requires jQuery
$(window).scroll(function(){
var threshold = 200; // number of pixels before bottom of page that you want to start fading
var op = (($(document).height() - $(window).height()) - $(window).scrollTop()) / threshold;
if( op <= 0 ){
$("#thing-to-hide").hide();
} else {
$("#thing-to-hide").show();
}
$("#thing-to-hide").css("opacity", op );