Skip to content

Instantly share code, notes, and snippets.

View lazyguru's full-sized avatar

Joe Constant lazyguru

View GitHub Profile
<?php
use UI\App;
use UI\Window;
use UI\Point;
use UI\Size;
use UI\Area;
use UI\Controls\Box;
use UI\Draw\Pen;
use UI\Draw\Brush;
use UI\Draw\Path;
@idleberg
idleberg / sublime-text-macos-context-menu.md
Last active April 28, 2025 22:55 — forked from vincentmac/sublime-text-osx-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@dillinghamio
dillinghamio / laravel-spark-rotating-pricing-table.md
Last active August 13, 2019 13:53
Laravel Spark Pricing Table

Rotating Pricing Table for Laravel Spark

Can be placed anywhere, try it out on welcome.blade.php


Laravel Spark Pricing Table ###If you're using team plans just swap out $sparkPlans = Spark::plans(); with $sparkPlans = Spark::teamPlans();


@Vinai
Vinai / M2 acl.xml
Last active February 27, 2025 20:36
My current Magento 2 PHPStorm File Templates (Feb 2016)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
</resource>
</resources>
</acl>
</config>
@JeffreyWay
JeffreyWay / PjaxMiddleware.php
Last active November 6, 2024 14:26
Laravel middleware for working with pjax.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
@gwillem
gwillem / magento-nginx.conf
Last active July 29, 2023 10:13
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@miguelbalparda
miguelbalparda / gist:b57a47a010a5995bc44d
Last active August 29, 2015 14:16
Check for global/crypt/key in Magento
find . -path './app/code/core' -prune -o -iname '*php' \! -type d -print0 | xargs -0 grep -il "global/crypt/key"
@ottonet
ottonet / auto-magento-config-for-nginx
Last active August 29, 2015 14:16
auto-resolving nginx magento development config with multi-domain and multi-storeview support.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
# Automatic generation of the server-name.
# both subdomain.domain.tld and storeview.subdomain.domain.tld work.
server_name ~^(((?<storeview>.*)\.)?((?<subdomain>.*)\.)(?<domain>[^.]+)\.(?<tld>[^.]+))$;
# set root folder. both storeview.dev.magen.to and dev.magen.to resolve to /var/www/magen/htdocs
root /var/www/${subdomain}/htdocs;
@coderabbi
coderabbi / gist:cdfc0b59fe381f55aef8
Last active August 29, 2015 14:10
Peer Code Review
Let's start simple.
Add your name, contact info (twitter) and a line or two describing where you're holding and what you're looking to get out of a pairing in the comments below.
If you make a connection, come back and remove your comment.
Over the course of a week (max) pledge each other one hour of code review.
Throw some code in a gist or a repo, invite your partner and see what happens.