Skip to content

Instantly share code, notes, and snippets.

Justin Kopepasah kopepasah

Block or report user

Report or block kopepasah

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
kopepasah / wp-always-on-panels.js
Last active Apr 30, 2019
Ensure some panels are "Always On".
View wp-always-on-panels.js
// Subscribe to changes in the redux store. () => {
// An array of "Always On" panel (metabox) ids to disallow disabling.
const alwaysOn = [];
// Current panels preferences
const panels = 'core/edit-post' ).getPreference( 'panels' );
// Loop over the panels object.
#!/usr/bin/env bash
# Shortcut for WP Snapshots usage in wp-local-docker
# @link:
function snap() {
if [ -f "$PWD/bin/" ]; then
sh ./bin/ "$@"

Reset Audio & Video, w/o restarting your Mac

A couple handy commands to help you restart your audio and video during a call, without restarting your computer.

kopepasah /
Created Nov 16, 2017
Updates WordPress Core on the Pantheon hosting platform using Terminus.
echo "Preparing update..."
terminus login -q
terminus connection:set sftp -q
echo "Validating update..."
if [[ $(terminus wp -- core check-update) == *"WordPress is at the latest version"* ]] 2>/dev/null; then
terminus wp -- core version --extra 2>/dev/null
echo "No WordPress Core update to apply."
kopepasah / colors-with-quoted-keys.scss
Last active Oct 19, 2017
Example code for the case to always use quotes in Sass maps.
View colors-with-quoted-keys.scss
$colors: (
"blue": "#2b55f3",
"green": "#39dd4a",
"yellow": "#f0f30f",
"red": "#ff2e35",
"orange": "#f8ad55",
@each $name, $color in $colors {
.#{$name} {
View breakpoint.sass
@mixin breakpoint( $start, $stop: null ) {
$breakpoints: (
'small': 480px,
'medium': 720px,
'large': 960px,
'huge': 1200px,
'container': $container,
$start: validate-point( $start, $breakpoints );
kopepasah / redirect-lost-posts.php
Created Jan 13, 2017
Simple redirect function to correctly redirect lost posts.
View redirect-lost-posts.php
* Redirect Lost Posts
* @author Justin Kopepasah <>
* @license MIT
add_action( 'template_redirect', function() {
// Only redirect if nothing is found.
if ( is_404() ) {
kopepasah / wp-menu-separator.php
Created Nov 16, 2016
Simple filter for adding a menu separator at a specific location on the WordPress admin menu.
View wp-menu-separator.php
* Adds a separator to the administration menus in a specific location.
* @param array $menu Associative array of administration menu items.
* @return array $menu Modified associative array of administration menu items.
add_filter( 'add_menu_classes', function( $menu ) {
$menu['44'] = array(
kopepasah /
Last active Nov 4, 2015
A simple JavaScript helper method for getting the query parameters of a URL and storing those parameters as an object.

Get Parameters

A simple JavaScript helper method for getting the query parameters of a URL and storing those parameters as an object. If no parameters are present, the method will return false.

Author: Justin Kopepasah
License: MIT

kopepasah / textmate-softwrap-example.js
Last active Oct 22, 2015
Demonstration of soft wrap in TextMate based on a wrap column setting of 80, even thought soft wrap is disabled.
View textmate-softwrap-example.js
// This is a comment that will be wrapped by softwrap (while other code is not |
softwrapped) when softwrap is disabled but wrap column is set to 80. |
$(function(){ |
$( 'example-code-no-wrapped' ).not().ever.().wrapped().no().matter().how().long().the().code().runs();
$( 'example-code-wrapped' |
).unnecesarily.wrapped().because().of().a().comment(); // Comment |
forces softwrap. |
}); |
You can’t perform that action at this time.