Skip to content

Instantly share code, notes, and snippets.

View smutek's full-sized avatar

Jimmy Smutek smutek

View GitHub Profile
@smutek
smutek / Bootstrap5NavWalker.md
Last active December 28, 2023 12:54
Bootstrap 5 Nav Walker for Sage 10

Bootstrap 5 Walker for Sage 10

Adds Bootstrap 5 css classes to the nice Soil nav walker in a Sage 10 project.

Assumptions

  • Assumes you're using Sage 10.
  • Assumes the Roots/Soil plugin is installed and activated.
  • Assumes Tailwind has been removed from the Sage project and Bootstrap 5 has been added.
@smutek
smutek / clearDock.bash
Last active August 9, 2020 21:46
Clear the OS X dock
# Overwrite persistent-apps array in defaults with an empty array
# run in console, save as an alias, whatever. See man defaults for more infoz
# ht: https://krypted.com/mac-security/remove-all-apps-from-the-dock-in-os-x/
defaults write com.apple.dock persistent-apps -array && killAll Dock
@smutek
smutek / CreateAlertComponent.java
Created September 15, 2018 23:08
CMIS 141 Week 4 Discussion
/*
* File: CreateAlertComponent.java
* Author: James Smutek
* Date: September 15, 2018
* Purpose: Create instances of Twitter Bootstrap's "Alert" Web Component
* @see: https://getbootstrap.com/docs/4.0/components/alerts/
*/
public class CreateAlertComponent {
// Variables
private int modifierKey;

Fix for Sublime not opening files via CLI command when ran from TMUX.

Install via brew: brew install reattach-to-user-namespace

Add to zshrc: set-option -g default-command "reattach-to-user-namespace -l zsh"

Restart Tmux server tmux kill-server

@smutek
smutek / Bootstrap4Nav-Sage9.md
Last active July 30, 2022 06:50
Bootstrap 4 Walker for Sage 9

Credit

This is a frankensteind version of the current Soil nav walker, by the Roots team, and Michael Remoero's Sagextras walker. All credit goes to those good folks. :)

Use

  • Replace the contents of header.blade.php with the attached header.
  • Copy the walker.php file to the /app directory.
  • Add walker.php to the Sage required files array in resources/functions.php - eg. on a stock Sage install the entry would look like:
/**
<?php
/**
* Gravity Forms : Check if file is attached
*
* Send a different notification email depending on whether a file is attached or not.
*
* For some reason the file upload field is not available to use with conditional logic
* when processing a gravity forms submission. So you cannot by default do something
* like perform one action if a file is attached and perform another if it is not.
*
@smutek
smutek / brand.php
Last active January 20, 2018 11:43
Filter WordPress Custom Logo
<?php
/**
* Site Brand
*
* Output site branding
*
* Use native WordPress site logo with custom (bootstrap friendly) markup
* Falls back to text title if logo is not set.
*
* @param $html
@smutek
smutek / vvv-fedora-25.md
Created February 11, 2017 19:22
Install VVV on Fedora 25

Installing Virtualbox, Vagrant, and VVV on Fedroa 25 requires a few extra steps.

Install Vagrant and Virtual Box

Follow the instructions here to install Virtual Box and Vagrant.

Install Ruby Tools

Add necessary Ruby tools neded to install vagrant plugins.

  • Ruby Devel: sudo dnf install ruby-devel
@smutek
smutek / addSimplenote.sh
Created January 22, 2017 21:35
Setup Simplenote on Fedora 25. Assumes Simplenote has been added to /opt/
SHORTCUT="[Desktop Entry]
Name=SimpleNote
Comment=Edit text files
Exec=/opt/Simplenote-linux-x64/Simplenote
Icon=/opt/Simplenote-linux-x64/Simplenote.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@smutek
smutek / sublime.setup.sh
Created January 22, 2017 19:54
Setup Sublime Text 3 on Fedora 25 - Assumes Sublime has been downloaded and moved to /opt/
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/opt/sublime-text-3/sublime_text
Icon=/opt/sublime-text-3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"