Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile

Get/set ID3 meta tags using ffmpeg

A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.

FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.

1. Read ID3 metadata

To list all global metadata tags for a media file, just set an input but no output file.

@eyecatchup
eyecatchup / ffmpeg.md
Last active May 2, 2024 10:06
Some common ffmpeg commands, I tend to forget..

cut sequence from mp4 video

ffmpeg -ss <start_time_hh:ii:ss> -i input.mp4 -to <length_in_hh:ii:ss_from_start> -c copy ./out.mp4
ffmpeg -ss 00:47:42 -i input.mp4 -to 00:01:49 -c copy ./out.mp4

create thumbnail images from input video (@30fps)

@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 25, 2024 13:54
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




Windows Resource Kit Tools


Advanced tool-set to streamline administrative tasks for Microsoft® Windows®.

Overview

Description

The Microsoft® Windows® Resource Kit Tools (RK-Tools) are a set of tools to help System-Administrators, Developers, and Powerusers streamline a wide range of common, administrative tasks for the Microsoft® Windows® Operating System (OS).

@eyecatchup
eyecatchup / catch-js-error-stacktrace.js
Created July 1, 2019 08:34
JavaScript global error handling
var sendError = function (err) {
console.log('Caught JS client error:');
console.dir(err);
var xhr = new XMLHttpRequest();
xhr.open('POST', '/api/error/add', true);
xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
xhr.send(JSON.stringify(err));
};
@eyecatchup
eyecatchup / mr.robot_season-2_easter-egg-sites.md
Last active April 4, 2024 10:39
A collection of "Mr. Robot" Season 2 Easter Egg Sites. #mrrobot #hackingrobot #robotegg
@eyecatchup
eyecatchup / calc-sapisidhash.js
Created April 14, 2022 07:39
Calculate SAPISIDHASH
async function getSApiSidHash(SAPISID, origin) {
function sha1(str) {
return window.crypto.subtle.digest("SHA-1", new TextEncoder("utf-8").encode(str)).then(buf => {
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join('');
});
}
const TIMESTAMP_MS = Date.now();
const digest = await sha1(`${TIMESTAMP_MS} ${SAPISID} ${origin}`);
@eyecatchup
eyecatchup / hammerhead-from-LMY47D-or-LMY47I-to-LMY48B.md
Created June 29, 2015 07:10
A step-by-step guide how to manually flash the Android 5.1.1 (LMY48B) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..
  UPDATE `NEXUS 5` 
     SET `VERSION`='5.1.1', `BUILD`='LMY48B', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.1.0' && `BUILD` IN ('LMY47D', 'LMY47I') && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;

A manual OTA for rooted hammerheads, quasi.

@eyecatchup
eyecatchup / GetPlusOnesByURL.php
Last active February 13, 2024 16:39
Several PHP functions to get the +1 count from Google+ users for a given URL.
<?php
/**
* GetPlusOnesByURL()
*
* Get the numeric, total count of +1s from Google+ users for a given URL.
*
* Example usage:
* <code>
* $url = 'http://www.facebook.com/';
* printf("The URL '%s' received %s +1s from Google+ users.", $url, GetPlusOnesByURL($url));
@eyecatchup
eyecatchup / which.bat
Created November 18, 2013 14:39
`which` for Win
::WHICH.BAT CommandName [ReturnVar]
::
:: Determines the full path of the file that would execute if
:: CommandName were executed.
::
:: The result is stored in variable ReturnVar, or else it is
:: echoed to stdout if ReturnVar is not specified.
::
:: If no file is found, then an error message is echoed to stderr.
::