Skip to content

Instantly share code, notes, and snippets.

View Ronkiro's full-sized avatar
😃
The real answer is 42.

Alexander Santos Ronkiro

😃
The real answer is 42.
View GitHub Profile
@nhevia
nhevia / semantic_git_commit_count.sh
Created August 21, 2020 11:16
Counts semantic git commits
git log --pretty=oneline --no-merges --since 2019/01/01 --until 2021/12/31 | cut -d " " -f 2 |\
cut -d "(" -f 1 | cut -d ":" -f 1 | sort -r | uniq -c | sort -nr -k1
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 4, 2024 17:49
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Elements-
Elements- / getMP4Length.js
Created March 26, 2016 18:32
Read the duration of a mp4 file nodejs
var buff = new Buffer(100);
fs.open(file, 'r', function(err, fd) {
fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) {
var start = buffer.indexOf(new Buffer('mvhd')) + 17;
var timeScale = buffer.readUInt32BE(start, 4);
var duration = buffer.readUInt32BE(start + 4, 4);
var movieLength = Math.floor(duration/timeScale);
console.log('time scale: ' + timeScale);
console.log('duration: ' + duration);