Skip to content

Instantly share code, notes, and snippets.

View jeffpamer's full-sized avatar

Jeff Pamer jeffpamer

View GitHub Profile
@jeffpamer
jeffpamer / encode.sh
Created March 16, 2018 19:38
Smooth Scrubbing Web Video FFMPEG Mega Command
ffmpeg -i input.mp4 -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -an -vf "scale=-1:1440, reverse" -preset veryslow -g 2 output.mp4
// -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3
// Encode for web with a good balance of browser compatibility and compression ratio
// -an
// Strip audio tracks
// -vf "scale=-1:1440, reverse"
// Scale video to 1440px wide, maintaining aspect ratio
@jeffpamer
jeffpamer / colorschemes.yml
Created February 19, 2020 21:25
Alacritty Colorschemes
# Colors (Dracula)
colors:
# Default colors
primary:
background: '0x282a36'
foreground: '0xf8f8f2'
# Normal colors
normal:
black: '0x000000'
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@jeffpamer
jeffpamer / wordpress-valet-install.md
Created September 19, 2017 19:00 — forked from orumad/wordpress-valet-install.md
How to install Wordpress from command line in Valet

How to install Wordpress from command line in Valet

I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)

This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.

Install 'WP-CLI' command line tool

@jeffpamer
jeffpamer / init.vim
Created September 30, 2016 20:31
Neovim Init
"Dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
set runtimepath+=/Users/jeffpamer/.config/nvim/repos/github.com/Shougo/dein.vim
call dein#begin('/Users/jeffpamer/.config/nvim')
" Let dein manage dein
@jeffpamer
jeffpamer / init.lua
Last active September 30, 2016 20:29
~/.hammerspoon/init.lua
local benqDisplay = "BenQ LCD"
local defaultDisplay = "Color LCD"
local padding = 20
-- disable animation
hs.window.animationDuration = 0
-- Quick if/else helper function
function fif(condition, if_true, if_false)
if condition then return if_true else return if_false end
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
'atom-text-editor.vim-mode:not(.insert-mode)':
'space': ' '
'space p': 'fathom-finder:toggle-file-finder'
'atom-text-editor.vim-mode:not(.insert-mode)[data-grammar~="clojure"]':
'space r': 'proto-repl:toggle'
'space e': 'proto-repl:exit-repl'
'space shift-b': 'proto-repl:execute-block'
'space b': 'proto-repl:execute-top-block'
'space s': 'proto-repl:execute-selected-text'
@jeffpamer
jeffpamer / README.md
Last active February 18, 2016 16:29
Reduce boilerplate using react-redux connect decorator and reselect selectors

When using the connect decorator (https://github.com/reactjs/react-redux) in conjunction with selectors (https://github.com/reactjs/reselect) a common pattern in your components appears:

import { connect } from 'react-redux';
import { selectCustomer } from 'stores/customer';
import { selectOrders, selectDeliveries } from 'stores/order';

@connect((state) => ({
    customer: selectCustomer(state),
    orders: selectCustomer(state),
@jeffpamer
jeffpamer / 0_reuse_code.js
Created February 18, 2016 15:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console