Skip to content

Instantly share code, notes, and snippets.

View webkader's full-sized avatar

Baris Aydin webkader

View GitHub Profile
@webkader
webkader / ffmpeg-watermark.md
Created July 13, 2015 18:21
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.

@webkader
webkader / mime_content_type.php
Last active March 19, 2022 14:56
PHP Mime type alternative
if (!function_exists('mime_content_type')) {
function mime_content_type($filename)
{
$mime_types = array(
'txt' => 'text/plain',
'htm' => 'text/html',
'html' => 'text/html',
@webkader
webkader / gulpfile.js
Created December 9, 2019 10:56 — forked from zthxxx/gulpfile.js
compile react component to both es and commonjs modules, with typescript and less in css modules
/**
* compile react component to both es and commonjs modules,
* with typescript and less in css modules
*
* @type {Gulp}
*/
const gulp = require('gulp')
const babel = require('gulp-babel')
const ts = require('gulp-typescript')
@webkader
webkader / Activate Office 2019 for macOS VoL.md
Created December 9, 2019 10:46 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@webkader
webkader / Firefox.md
Last active March 2, 2019 12:08
Dienste in Firefox deaktivieren

Überflüssige Cloud-Dienste in Firefox deaktivieren

Firefox bietet mehrere Dienste, die die "User Experience" verbessern sollen und dafür irgendwelche Daten auf irgendwelche Cloud Server hochladen:

  1. Pocket-API ist eine Erweiterung, mit der man Webseiten komplett in einem sogenannten Pocket speichern und später lesen kann. In der Praxis kann man natürlich auch Lesezeichen dafür nutzen oder die Download Funktion, wenn man eine Webseite später in genau diesem Zustand lesen möchte.

    Die Pocket-API ist überflüssig, kann man unter "about:config" deaktivieren: extensions.pocket.enabled = false

  2. Screenshots ist eine Erweiterung, mit der man Bildschirmfotos erstellen kann, die automatisch auf den Cloud-Server "screenshots.mozilla.com" hoch­geladen werden und von dort mit einem Klick auf Social Media Webseiten verbreitet werden könnten.

In den Datenschutzhinweisen weist Mozilla darau

@webkader
webkader / curl.md
Created October 2, 2018 09:34 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@webkader
webkader / wp-query-ref.php
Created July 11, 2018 14:53 — forked from luetkemj/wp-query-ref.php
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@webkader
webkader / copy-from-time-machine.sh
Created October 30, 2017 18:08 — forked from vjt/copy-from-time-machine.sh
Copy data from a Time Machine volume mounted on a Linux box.
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#
@webkader
webkader / custom-shipping-and-billing
Created October 14, 2017 20:53 — forked from hannahswain/custom-shipping-and-billing
Customizing WooCommerce checkout fields - Adding custom shipping and billing fields
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['shipping']['shipping_phone'] = array(
'label' => __('Phone', 'woocommerce'),
'placeholder' => _x('Phone', 'placeholder', 'woocommerce'),
'required' => false,
'class' => array('form-row-wide'),
action
add
aggregate
all
alter
after
and
as
asc
avg