Skip to content

Instantly share code, notes, and snippets.

View asecondwill's full-sized avatar

will asecondwill

View GitHub Profile
PHP Warning: Module "newrelic" is already loaded in Unknown on line 0
phpinfo()
PHP Version => 8.0.27
System => Linux wairc-kman-1 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
Build Date => Jan 6 2023 15:27:43
Build System => Linux
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/8.0/cli
Prefix Verb URI Pattern Controller#Action
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
user_password PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
POST /users/password(.:format) devise/passwords#create
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.8)
actionview (= 4.1.8)
activesupport (= 4.1.8)
Sites ❯ brew tap homebrew/homebrew-php
==> Tapping homebrew/php
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 650, done.
remote: Compressing objects: 100% (405/405), done.
remote: Total 650 (delta 354), reused 483 (delta 243), pack-reused 0
Receiving objects: 100% (650/650), 304.41 KiB | 0 bytes/s, done.
Resolving deltas: 100% (354/354), done.
Error: Invalid formula: /usr/local/Library/Taps/homebrew/homebrew-php/Formula/arcanist.rb
Formulae found in multiple taps:
@asecondwill
asecondwill / gist:e3c99ad3d653619b05e9
Created March 25, 2015 11:12
Install new version of ruby
rbenv install 2.2.0
rbenv rehash
gem install bundler
bundle install
function GetCertainPostTypes($query) {
if ($query->is_search) {
$query->set('post_type',array('person'));
}
return $query;
}
add_filter('pre_get_posts','GetCertainPostTypes');
@asecondwill
asecondwill / products.twig
Created September 20, 2014 07:48
products.twig
{% extends "base.twig" %}
{% block sectionheader %}
<div class="gray">
<div class="row">
<div class="columns medium-2"><h2>Store</h2></div>
<div class="columns medium-10">
<div class="product-cats">
{% for cat in cats %}
@asecondwill
asecondwill / woocommerce.php
Last active June 20, 2017 13:09
and the php
<?
$context = Timber::get_context();
$context['cats'] = Timber::get_terms('product_cat');;
if (is_singular('product')) {
$context['post'] = Timber::get_post();
$product = get_product( $context['post']->ID );
$context['product'] = $product;
add_action( 'mc_attributes', function($product){
$product->list_attributes();
@asecondwill
asecondwill / single-product.twig
Last active September 29, 2021 16:19
messing with timber & woo
{% extends "base.twig" %}
{% block sectionheader %}
<div class="gray">
<div class="row">
<div class="columns medium-2"><h2>Store</h2></div>
<div class="columns medium-10">
<div class="product-cats">
{% for cat in cats %}
<a href="{{cat.link}}">{{cat.name}}</a>
{% if not loop.last %} // {% endif %}