Skip to content

Instantly share code, notes, and snippets.

View timramseyjr's full-sized avatar

Tim Ramsey timramseyjr

View GitHub Profile
@timramseyjr
timramseyjr / PublishesMigrations.php
Created August 8, 2022 16:01 — forked from DarkGhostHunter/PublishesMigrations.php
Publish migrations as assets instead of loading them.
<?php
namespace Vendor\Package;
use Generator;
use Illuminate\Support\Str;
trait PublishesMigrations
{
/**
@timramseyjr
timramseyjr / _readme.md
Created March 3, 2020 17:52 — forked from mrjones-plip/_readme.md
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php
@timramseyjr
timramseyjr / Envoy.blade.php
Created November 4, 2019 21:34 — forked from gvsrepins/Envoy.blade.php
A Laravel envoy script for deployment
@servers(['production' => 'productionserver', 'local'=> '[email protected] -p 2222'])
{{-- Configuration section --}}
@setup
/*
|--------------------------------------------------------------------------
| Git Config
|--------------------------------------------------------------------------
|
@timramseyjr
timramseyjr / favicon.html
Created July 6, 2017 11:42 — forked from bcherny/favicon.html
100% cross browser favicon declaration
<!--
favicons (see http://www.jonathantneal.com/blog/understand-the-favicon)
---
icon format dimensions documentation
---- ------ ---------- -------------
apple-touch-icon PNG 152x152 https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1
icon PNG 96x96
shortcut icon ICO 32x32
msapplication-TileImage PNG 144x144
@timramseyjr
timramseyjr / 1-instructions.md
Created June 20, 2016 17:47 — forked from kyledurand/1-instructions.md
[Supply] Sub Dropdown Menus

OUTDATED - Use only as inspiration

Nested / Sub Dropdown Menu for (Almost) Any Shopify theme Based off of Timber

  1. Replace site-nav.liquid with the snippet below.
  2. Add the styles below to timber.scss.liquid.
  3. Go make popcorn.
  4. Check your homepage to see if this has worked.
  5. It didn't work.
  6. Eat the popcorn and try to figure out what went wrong.
@timramseyjr
timramseyjr / all_attribute_options
Created May 27, 2016 17:11 — forked from pierreandreroy/all_attribute_options
Get all possible value (dropdown options) of a product attribute in Magento.
<?php
//Possible color value
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color'); //"color" is the attribute_code
$allOptions = $attribute->getSource()->getAllOptions(true, true);
foreach ($allOptions as $instance) {
$id = $instance['value']; //id of the option
$value = $instance['label']; //Label of the option
}
?>