Skip to content

Instantly share code, notes, and snippets.

View alexanderwiebe's full-sized avatar

Alexander (AJ) alexanderwiebe

View GitHub Profile
@alexanderwiebe
alexanderwiebe / .zshrc
Last active October 27, 2025 20:45
Copy-previous-command-and-output
# Temporary files
export PREV_CMD_FILE="/tmp/zsh_prev_command.txt"
export PREV_OUT_FILE="/tmp/zsh_prev_output.txt"
export PREV2_CMD_FILE="/tmp/zsh_prev2_command.txt"
export PREV2_OUT_FILE="/tmp/zsh_prev2_output.txt"
# Capture the command before it runs
preexec() {
# Shift old files
mv "$PREV_CMD_FILE" "$PREV2_CMD_FILE" 2>/dev/null
#!/bin/zsh
filename=$1
rootname="${filename%.*}"
ffmpegOut="ffmpeg-$rootname.gif"
imageMagicOut="imgmgc-$rootname.gif"
finalGif="$rootname.gif"
ffmpeg -ss 00:00:00.000 -i $filename -pix_fmt rgb24 -r 24 $ffmpegOut
convert -layers Optimize $ffmpegOut $imageMagicOut
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">