Skip to content

Instantly share code, notes, and snippets.

View thinkstylestudio's full-sized avatar

Theron Smith thinkstylestudio

View GitHub Profile
@JeffreyWay
JeffreyWay / laravel-elixir-webpack.js
Last active February 9, 2019 04:31
Laravel Elixir Webpack Extension
var gulp = require('gulp');
var gulpWebpack = require('webpack-stream');
var Elixir = require('laravel-elixir');
var $ = Elixir.Plugins;
var config = Elixir.config;
/*
|----------------------------------------------------------------
| Webpack Compilation
@jehaby
jehaby / README.md
Last active October 8, 2024 17:23 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@ethicka
ethicka / wp-start.sh
Last active December 27, 2023 07:10
WordPress Installation with the Roots/Sage Framework and VirtualHost Creation
#!/bin/bash -e
##
# WordPress Installation and VirtualHost Creation
#
# Description: Installs a WordPress website in the ~/Sites folder, creates a homepage,
# cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks,
# clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes,
# installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file
# to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress
@petericebear
petericebear / .php_cs
Last active October 3, 2024 21:26
Laravel 5.x php-cs-fixer config file
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
@guiwoda
guiwoda / AR_Cache_Repository.php
Last active February 25, 2023 21:11
AR (Eloquent) vs DM (Doctrine) gist
<?php
namespace App\ActiveRecord;
class PostRepository
{
private $cache;
public function __construct(Cache $cache)
{
// Any set() / get() cache implementation.
@rorymcdaniel
rorymcdaniel / loop-multisite.sh
Created December 16, 2015 01:48
Bash script that will regenerate all images for all sites in a WordPress multisite network
#!/bin/bash
for site in `wp site list --field=url`; do
wp media regenerate --yes --url=$site
done
~
@ezekg
ezekg / import-store-locations.php
Last active December 22, 2022 08:35
Import CSV script for WP Store Locator plugin
<?php
/**
* This is a quick and dirty script. This should NEVER be run on a production server.
*
* Include this script at the bottom of your functions.php file, e.g.
*
* ```php
* // Your functions.php file
* // ...
<?php
use Illuminate\Database\Seeder;
class PostTagTableSeeder extends Seeder
{
/**
* @var
*/
private $pivotData = [];
@Lordnibbler
Lordnibbler / alfred_snippets.txt
Created August 15, 2015 08:06
Alfred Snippets
# <name> / <snippet>
# dnsmasq
edit dnsmasq.conf / vi /usr/local/etc/dnsmasq.conf
kill dnsmasq / sudo killall -9 dnsmasq
load dnsmasq / sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
unload dnsmasq / sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
flush DNS caches / sudo discoveryutil udnsflushcaches
# git/hub
@vluzrmos
vluzrmos / .php_cs.php
Created July 8, 2015 21:09
phpcs-fixer configuration file to Laravel style. Note: rename this to .php_cs and put on root of your project or package.
<?php
$finder = Symfony\Component\Finder\Finder::create()
->files()
->in(__DIR__)
->exclude('vendor')
->notName("*.txt")
->ignoreDotFiles(true)
->ignoreVCS(true);