Skip to content

Instantly share code, notes, and snippets.

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

Erik Jonasson ejonasson

🏠
Working from home
  • Shelterluv
  • Gainesville, Florida
  • 02:19 (UTC -05:00)
View GitHub Profile
@ejonasson
ejonasson / spatie-data-synth.php
Created August 21, 2023 19:41
Spatie Data Synth
<?php
namespace App\Shared\DataObjects;
use Livewire\Features\SupportWireables\WireableSynth;
use Spatie\LaravelData\Contracts\DataObject;
use Spatie\LaravelData\DataCollection;
use Spatie\LaravelData\Resolvers\DataFromSomethingResolver;
class DataObjectSynth extends WireableSynth
// REPLACE THIS WITH THE CAMPAIGN'S ID
var campaignId = 'XXXXX';
// DO NOT EDIT BELOW THIS LINE
document.addEventListener('tp.Main.EventListener.Ready', function () {
var event = new CustomEvent('tp.Custom.Submit', {
bubbles : true,
cancelable : true,
detail : {
widgetId: campaignId,
fields: []
@ejonasson
ejonasson / openbrowser.sh
Created April 4, 2017 14:26
Open A URL in Chrome, Safari, or Firefox
#!/bin/bash
## Takes an Input URL and opens thatin Chrome, Safari, and Firefox
## Used for Cross-Browser Testing
## Presumably only works on OSX
export url="$1"
open -a /Applications/Safari.app $url
open -a /Applications/Firefox.app $url
open -a /Applications/Google\ Chrome.app $url
// Where $email = your user's email address
// and $product_id = the ID number of the product you'd like to add them to
$zippy = Zippy::instance();
$user_id = email_exists($email);
if (!$user_id) {
$student = $zippy->make('student');
$student->username = $$email;
$student->email = $email;
@ejonasson
ejonasson / html_to_md.sh
Last active August 29, 2015 14:00 — forked from hugorodgerbrown/md_to_rst.sh
Turns all HTML docs in a directory into Markdown Files
# Based of md_to_rst.sh script written by https://gist.github.com/hugorodgerbrown
# This script was created to convert a directory full
# of html files into md equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .html files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#