Skip to content

Instantly share code, notes, and snippets.

Jeff Pamer jeffpamer

Block or report user

Report or block jeffpamer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .spacemacs
;; -*- 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 / encode.sh
Created Mar 16, 2018
Smooth Scrubbing Web Video FFMPEG Mega Command
View encode.sh
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 / wordpress-valet-install.md
Created Sep 19, 2017 — forked from orumad/wordpress-valet-install.md
How to install Wordpress from command line in Valet
View wordpress-valet-install.md

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

View init.vim
"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
View .spacemacs
;; -*- 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 / init.lua
Last active Sep 30, 2016
~/.hammerspoon/init.lua
View 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
View atom-keymap.cson
'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 / 0_reuse_code.js
Created Feb 18, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jeffpamer
jeffpamer / README.md
Last active Feb 18, 2016
Reduce boilerplate using react-redux connect decorator and reselect selectors
View README.md

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 / gist:3eae9d46e46d472f9a2a
Last active Aug 29, 2015
Destructure Restructure Pick
View gist:3eae9d46e46d472f9a2a
// given this object:
var origObj = {
first_name: 'test',
last_name: 'user',
email_address: 'user@test.com',
otherThing: 1234,
oneOtherThing: 5678
};
// what's the best/coolest way to get:
You can’t perform that action at this time.