Skip to content

Instantly share code, notes, and snippets.

@steelbrain
steelbrain / music_metadata.js
Last active December 1, 2018 06:35
Song metadata filling with ffmpeg node script
#!/usr/bin/env node
// Usage:
// $ cd dir/to/music
// $ node ../../music_metadata.js
// Files format must be:
// [Artist] - [Song Title].{oga,m4a}
const fs = require('fs')
const os = require('os')
@steelbrain
steelbrain / git-c
Last active August 23, 2017 05:10
Fancy git commit
#!/bin/bash
# Author: Steel Brain <i@steelbrain.me>
# Name: Git Commit
# Steps:
# - Check if jq is installed or not (need it for parsing package.json)
# - Shows unstaged files
# - Shows staged files
# - Confirms the user they want to proceed
# - Execute the build step and check in any files it modifies
@steelbrain
steelbrain / git-post-pr.sh
Created August 16, 2017 20:55
git-post-pr
#!/bin/bash
# Usage:
# git-post-pr
# Description:
# Deletes local branch (doesn't force so you won't lose local if not pushed remotely)
# Fetches remote so local remote branch is deleted
# Switches to master
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"