Skip to content

Instantly share code, notes, and snippets.

Jacob Bearce JacobDB

View GitHub Profile
@JacobDB
JacobDB / .scripts.log
Created Apr 10, 2019
Log of output of `.scripts` for VS Code Chrome Debugger debugging https://github.com/Microsoft/vscode-chrome-debug/issues/802
View .scripts.log
.scripts
› VM83
› VM84
› http://framework.localhost
› http://framework.localhost/wp-content/themes/framework/assets/scripts/fontawesome.cc84fb87.js (c:\Users\Jacob\Repositories\new-site\dev\assets\scripts\fontawesome.cc84fb87.js)
› http://framework.localhost/wp-content/themes/framework/assets/scripts/modern.08943789.js (c:\Users\Jacob\Repositories\new-site\dev\assets\scripts\modern.08943789.js)
› webpack:///(webpack)/buildin/module.js
› webpack:///./node_modules/@dotsunited/load-css-polyfill/dist/load-css-polyfill.mjs
› webpack:///./node_modules/@fortawesome/fontawesome-svg-core/index.es.js
View modern.08943789.js
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@JacobDB
JacobDB / install-acf.sh
Last active Feb 6, 2019
Download and install ACF Pro via a bash script – to be used with WP CLI. Set an environemnt variable ACF_KEY first!
View install-acf.sh
#!/bin/sh
# Adapted from https://support.advancedcustomfields.com/forums/topic/download-acf-with-wp-cli-on-clean-install/#post-26191
# get plugin path
acf_zip_file="$(wp plugin path)/advanced-custom-fields-pro.zip"
# get acf zip file
wget -O ${acf_zip_file} "http://connect.advancedcustomfields.com/index.php?p=pro&a=download&k=$ACF_KEY"
@JacobDB
JacobDB / renew-letsencrypt.sh
Created Nov 16, 2018
Simple bash script to disable UFW, renew Lets Encrypt certificates, restart GitLab nginx, and re-enable UFW
View renew-letsencrypt.sh
ufw disable
certbot renew --renew-hook "/usr/bin/gitlab-ctl restart nginx"
ufw --force enable
@JacobDB
JacobDB / .htaccess
Last active Nov 9, 2018
Clone a repository, generate a symlink, and protect the deployment folder for use with git-deploy – https://github.com/vicenteguerra/git-deploy
View .htaccess
Order Allow,Deny
Deny from all
<Files "deploy.php">
Allow from all
</Files>
@JacobDB
JacobDB / ssh-on-wsl.md
Created Oct 29, 2018
Setting up SSH Server on WSL
View ssh-on-wsl.md
  1. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  2. chmod 700 ~/.sssh
  3. chmod 600 ~/.ssh/auhotirzed_keys
@JacobDB
JacobDB / wp-login.scss
Created Sep 24, 2018
Default login styles for WordPress along with color functions to easily change the theme
View wp-login.scss
$base: #0085BA;
$tint: lighten(desaturate(adjust-hue($base, 1.6532), 27.2727), 6.6667);
$shade: darken(adjust-hue($base, 2.5111), 6.4706);
input:focus {
border-color: #5b9dd9; // @NOTE lighten(desaturate(adjust-hue($base, 11.4747), 37.6238), 23.9216)
box-shadow: 0 0 2px rgba(30,140,190,.8); // @NOTE transparentize($tint, 0.2)
}
input[type="checkbox"]:checked::before {
@JacobDB
JacobDB / getftpjson.sh
Created Sep 19, 2018
Simple script to quickly get my ftp.json for older sites; place in /usr/local/bin
View getftpjson.sh
#!/bin/bash
curl -LOk https://gist.githubusercontent.com/JacobDB/a04f5ba7e00b267e71e2/raw/254fa0ae3545106f038af28d7d8ab30a440b2c0e/ftp.json
View gist:69abafedee7df48b7eea7f0fbf3e42eb
nativefier --name "Android Messages" --tray --single-instance --icon icon.png "https://messages.android.com"
@JacobDB
JacobDB / config.js
Last active Apr 14, 2018
Why does this task not work when I put everything directly in a promise?
View config.js
// JavaScript Document
// Scripts written by __gulp_init__author_name @ __gulp_init__author_company
module.exports = {
// config task, generate configuration file for uploads & BrowserSync and prompt dev for input
config(gulp, plugins, requested = "") {
// generate config.json and start other functions
const generate_config = (file_name, mode = "ftp") => {
// store array of config file URIs
You can’t perform that action at this time.