Skip to content

Instantly share code, notes, and snippets.

View ingageco's full-sized avatar

Jay Hughes ingageco

View GitHub Profile
@mpociot
mpociot / vite.config.js
Last active May 7, 2023 22:11
Using Vite in combination with Valet's secured sites
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import fs from 'fs';
import { resolve } from 'path';
import { homedir } from 'os';
let host = 'sendstack.test';
let homeDir = homedir();
let serverConfig = {};
@andregivenchy
andregivenchy / custom-google-translate-widget.markdown
Created December 31, 2020 08:10
Custom Google Translate Widget
@nntrn
nntrn / espn-api-list.md
Last active May 4, 2024 19:05
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@AnalyzePlatypus
AnalyzePlatypus / vue-click-outside.md
Last active April 27, 2024 05:32
Vue.js 2.7: Detect clicks outside an element (Close modals, popups, etc.)

Detecting outside clicks in Vue.js

See this StackOverflow thread

First off, include the directive at the end of this gist.

  1. On your open button, make sure to use @click.stop to prevent the open click event from closing your modal.
  2. On your modal, add the v-click-outside directive and points it at a function to call when clicked outside.

Example:

@dillinghamio
dillinghamio / Spark User Team Seeding.md
Last active November 23, 2020 13:07
Spark User Team Seeding

Seeding Users & Teams In Laravel Spark

Makes 5 users each with 1 team that has 5 members

Add a team factory to database/factories/ModelFactory.php

$factory->define(App\Team::class, function (Faker\Generator $faker) {
    return [
 'name' => $faker->sentence,
@purzlbaum
purzlbaum / customizer.php
Last active March 17, 2024 20:37
Google Font select for WordPress Customizer
<?php
new theme_customizer();
class theme_customizer {
public function __construct() {
add_action( 'customize_register', array(&$this, 'customize_linje' ));
}
/**
* Customizer manager demo
@jacobwise
jacobwise / remove-entry-header-genesis
Created April 30, 2015 15:15
Remove Entry Header Genesis on front page
<?php
add_action( 'genesis_before', 'prefix_remove_entry_header' );
/**
* Remove Entry Header
*/
function prefix_remove_entry_header()
{
if ( ! is_front_page() ) { return; }
@growdev
growdev / gist:b68e35b5c6e0856bdbf1
Created March 19, 2015 19:01
Delete all WooCommerce Products with wp-cli
wp post list --field=ID --post_type=product | xargs wp post delete --force
@sean-hill
sean-hill / Ionic and Pushwoosh example
Last active May 23, 2019 15:37
Pushwoosh Service for Ionic Apps
Ionic and Pushwoosh example
Run this in your Mac Terminal (assuming you have the Ionic CLI):
----------------------------------------------------------------
ionic start wkwebviewpolyfilltest
cd wkwebviewpolyfilltest
ionic setup sass
ionic platform add ios
ionic plugin add https://github.com/EddyVerbruggen/cordova-plugin-wkwebview
ionic build
----------------------------------------------------------------