Skip to content

Instantly share code, notes, and snippets.

View jonathanbossenger's full-sized avatar
🏠
Working from home

Jonathan Bossenger jonathanbossenger

🏠
Working from home
View GitHub Profile
@jonathanbossenger
jonathanbossenger / Create Mobile Icons.jsx
Last active January 1, 2016 11:28 — forked from twonjosh/Create iOS Icons.jsx
Create mobile app icons
// Photoshop Script to Create Mobile Icons (Android/iOS) for Phonegap build
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@jonathanbossenger
jonathanbossenger / vagrant.yml
Last active June 6, 2016 08:50
ScotchBox vagrant.yml
#site specific settings
site:
ip: 192.168.33.10
sitename: sitename
mysqlpassword: password
function aw_module_setup() {
if ( class_exists( 'ET_Builder_Module' ) ) {
class AW_BE_ET_Builder_Module_Blog extends ET_Builder_Module {
function init() {
$this->name = esc_html__( 'Blog', 'et_builder' );
$this->slug = 'et_pb_blog_aw';
$this->whitelisted_fields = array(
@jonathanbossenger
jonathanbossenger / gist:6dc433e8f0dff41e2a9985f7591f286c
Created February 14, 2017 11:46
WooCommerce gettext string replacement example.
function xx_woo_text_strings( $translated_text, $text, $domain ) {
if ('woocommerce' == $domain){
$strings = array('Coupons' => 'Vouchers', 'Coupon Code' => 'Voucher Code');
foreach ($strings as $original => $updated) {
$string_found = stristr($translated_text, $original);
if( $string_found !== FALSE ) {
$translated_text = str_ireplace($original, $updated, $translated_text);
Group rules for the Divi Hackers United Group https://www.facebook.com/groups/144226352778581
As with any gathering of people online, there need to be some rules, merely to help keep the peace and maintain the purpose of the group.
1. Posts MUST be related to either PHP or JavaScript, ideally specific to solving some problem you are experiencing with Divi or a Divi related product. However any PHP or JavaScript tutorials that are not specific to Divi are also welcome.
2. There are three types of posts allowed here, questions, solutions or open discussions. If you have a specifically PHP or JavaScript question, you may post it here. If you have a specifically PHP or JavaScript tutorial or solution to a problem you were experiencing, you may post it here. If you want to discuss a PHP or JavaScript relevant topic with the members here, you may post it. I will also allow general comments/discussions related to the group itself. At this point, anything else will be considered spam.
3. Please tag your posts e
@jonathanbossenger
jonathanbossenger / Vagrantfile
Last active April 21, 2017 02:06
ScotchBox Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
settings = YAML.load_file 'vagrant.yml'
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
@jonathanbossenger
jonathanbossenger / pr.md
Created May 5, 2017 20:13 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
@jonathanbossenger
jonathanbossenger / ajaxComplete.js
Created August 29, 2017 11:15
ajaxComplete.js
jQuery(document).ready(function($){
$(document).ajaxComplete(function () {
$(".more-link").text("New text");
});
});
function ssa_get_safe_podcast_json() {
$args = array(
'post_type' => 'podcast',
'posts_per_page' => - 1,
'post_status' => 'any',
'orderby' => 'ID',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'audio_file',