Skip to content

Instantly share code, notes, and snippets.

View weberjacob's full-sized avatar

Jacob Weber weberjacob

View GitHub Profile
@jacerider
jacerider / wildcard
Last active February 7, 2018 17:18
Wildcard SSL generator for local dev
#!/bin/bash
set -e
#Set fonts for Help.
NORM=`tput sgr0`
BOLD=`tput bold`
REV=`tput smso`
SSL_PATH="${HOME}/Sites/ssl"
@stolinski
stolinski / keybindings.json
Created June 21, 2017 23:10
VSCode Tab Switching Keybindings
[
{ "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" },
{ "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" },
{ "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" },
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" },
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" },
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" },
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" },
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" },
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" },
@JamoCA
JamoCA / Sanitize_Target_Blank.htm
Last active September 5, 2020 20:51
Use jQuery to automatically add noopener, noreferrer and nofollow to links w/target="_blank".
<cfcontent type="text/html; charset=UTF-8">
<!doctype html>
<html lang="en">
<head>
<title>Sanitize target="_blank"</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js" type="text/javascript"></script>
<script type="text/javascript">
/* 3/24/2017 Sanitize_Target_Blank.htm https://gist.github.com/JamoCA/80f65eb07f054b1326221bd4f15868d6 */
function sanitizeTargetBlank(){
$('#linkDiv a[rel~=external]').prop('target', '_blank');
@grafikchaos
grafikchaos / magento2-installation-via-command-line.md
Last active August 23, 2018 21:53
Magento 2 Installation via command line

Install Magento 2 Community Edition (CE)

Via Composer

You can use the Magento integrator instructions to install download/install Magento 2 via composer

Get the Magento CE metapackage

To get started:

@certainlyakey
certainlyakey / library.scss
Last active March 5, 2024 16:40
URL-encode color SASS function / convert color to hex SASS function
//does not work with colors containing alpha
@function encodecolor($string) {
@if type-of($string) == 'color' {
$hex: str-slice(ie-hex-str($string), 4);
$string:unquote("#{$hex}");
}
$string: '%23' + $string;
@return $string;
}
@petemcw
petemcw / 01-README.md
Last active February 2, 2024 11:50
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@chuckreynolds
chuckreynolds / wordpress-change-domain-migration.sql
Last active February 10, 2023 18:56
UPDATE: Use WP-CLI find-replace command to edit URLs in your database. https://developer.wordpress.org/cli/commands/search-replace/ Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: al…
/* Use WP-CLI instead https://developer.wordpress.org/cli/commands/search-replace/ */
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
@plapier
plapier / Typekit font mixin.scss
Created October 31, 2012 18:39
Sass Mixin for typekit variation-specific font-family names
Sass Mixin for typekit variation-specific font-family names
Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles)
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
// Must include fallbacks for EACH typekit font — set them each as variables
//************************************************************************//
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2]