Skip to content

Instantly share code, notes, and snippets.

Jimmy Smutek smutek

Block or report user

Report or block smutek

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
@smutek
smutek / twitter-auth.php
Last active Jul 19, 2019
Twitter Application-only Auth Flow with PHP
View twitter-auth.php
<?php
/**
* Get Tweets with Application-only Authentication
*
* Connect to the twitter API and return Tweets using Application-only
* authentication. Application-only authentication allows an app to read,
* but not write data.
*
* Authorization Flow
*
@smutek
smutek / CreateAlertComponent.java
Created Sep 15, 2018
CMIS 141 Week 4 Discussion
View CreateAlertComponent.java
/*
* 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;
View sublime-tmux-fix.md

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 Feb 11, 2020
Bootstrap 4 Walker for Sage 9
View Bootstrap4Nav-Sage9.md

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:
/**
View checkResume.php
<?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 Jan 20, 2018
Filter WordPress Custom Logo
View brand.php
<?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 Feb 11, 2017
Install VVV on Fedora 25
View vvv-fedora-25.md

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 Jan 22, 2017
Setup Simplenote on Fedora 25. Assumes Simplenote has been added to /opt/
View addSimplenote.sh
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 Jan 22, 2017
Setup Sublime Text 3 on Fedora 25 - Assumes Sublime has been downloaded and moved to /opt/
View sublime.setup.sh
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;"
@smutek
smutek / content-page.blade.php
Last active Dec 19, 2019
Simple Sage 9 Slider with Slick
View content-page.blade.php
@php(the_content())
@if($images)
@include('partials/slider')
@endif
You can’t perform that action at this time.