Skip to content

Instantly share code, notes, and snippets.

View mrxinu's full-sized avatar

Steve Klassen mrxinu

View GitHub Profile

Output one image per second of the source (-i) video as photos/output_00001.png through the end.

ffmpeg -i your-video-file.mp4 -r 1 photos/output_%05d.png

Convert input media to another type:

ffmpeg -i input.avi output.mp4

Output one image per second of the source (-i) video as photos/output_00001.png through the end.

ffmpeg -i your-video-file.mp4 -r 1 photos/output_%05d.png

Convert input media to another type:

ffmpeg -i input.avi output.mp4

Remove the Terminal Friction

ZSH AutoSuggestions

You write lots of commands so it'd be awesome if the made helpful suggestions. It's terminal equivalent of the Microsoft paperclip.

Microsoft paperclip

Example

I started typing vi and was helpfully offered the following:

Keybase proof

I hereby claim:

  • I am mrxinu on github.
  • I am mrxinu (https://keybase.io/mrxinu) on keybase.
  • I have a public key ASAkjzDPfsJ4cpPwC4yA4NZAYEwWqhs7eW8st1xu9LF8JAo

To claim this, I am signing this object:

package main
import (
"image"
"image/color"
"math"
"math/rand"
"time"
"github.com/peterhellberg/natsdraw"
@mrxinu
mrxinu / ebiten-gfx-blocks.go
Created November 11, 2020 13:11 — forked from peterhellberg/ebiten-gfx-blocks.go
Blocks rendered by Ebiten with gfx.
package main
import (
"github.com/hajimehoshi/ebiten"
"github.com/peterhellberg/gfx"
)
const (
title = "Ebiten GFX Blocks"
scale = 4
package main
import (
"flag"
"image"
"image/color"
"time"
"github.com/peterhellberg/gfx"
)
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/png"
"math"

Run from the command ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31 or ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31 eu if on the EU datacenter.

# ruby script_name.rb API_TOKEN 2019-01-01 2019-12-31
require 'samanage'
require 'csv'

api_token, start_date, end_date, datacenter = ARGV
@samanage = Samanage::Api.new(token: api_token, datacenter: datacenter)
DEFAULT_FILENAME = "Incident Report #{DateTime.now.strftime("%b-%d-%Y-%l%M")}.csv"
<AlertDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Alerting.Models">
<AlertID>1009</AlertID>
<AlertMessage>All replication neighbors are dead</AlertMessage>
<AlertRefID>74913425-d003-4b48-bcb0-96a049f31ce6</AlertRefID>
<Canned>false</Canned>
<Category />
<CreatedBy>omavel</CreatedBy>
<CustomProperties xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">