Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
| import Vue from 'vue'; | |
| /** | |
| * EventHub to listen or broadcast to all components | |
| * | |
| * @see https://shopify.dev/tutorials/develop-theme-sections-integration-with-theme-editor | |
| * | |
| * Usage: eventHub.$on('shopify:section:select:{my-section-name}', (event) => handleSelect()); | |
| * | |
| */ |
| tail -f -n 450 storage/logs/laravel*.log \ | |
| | grep -i -E \ | |
| "^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
| --color |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Routing\Route; | |
| use Illuminate\Support\ServiceProvider; | |
| use App\Http\Middleware\CaptureRequestExtension; | |
| class AppServiceProvider extends ServiceProvider |
It's hard to migrate section themes that rely heavily on images. This bit of code helps you download all the CDN assets of your theme.
cdn_assets folderdownload_assets.js file at the root of your projectdownload_assets.js file to match the path to your settings_data.json (line 3)download_assets.js file to set the "CDN code" of your store.
Each file that you upload from /admin/settings/files gets uploaded with the following format:
https://cdn.shopify.com/s/files/1/YOUR_CDN_CODE/files/YOURFILE. The format of the code is /\d{4}\/\d{4}/ (four digits, a forward slash, and four digits)| {% if first_time_accessed %} | |
| <script> | |
| (function(dataLayer){ | |
| var customer_type = ({{customer.orders_count}} > 1) ? 'repeatcustomer' : 'newcustomer'; | |
| var discounts = "{{ order.discounts | map: 'code' | join: ',' | upcase}}"; | |
| function strip(text){ | |
| return text.replace(/\s+/, ' ').replace(/^\s+/, '').replace(/\s+$/, ''); | |
| } |
| var Shopify = Shopify || {}; | |
| // --------------------------------------------------------------------------- | |
| // Money format handler | |
| // --------------------------------------------------------------------------- | |
| Shopify.money_format = "${{amount}}"; | |
| Shopify.formatMoney = function(cents, format) { | |
| if (typeof cents == 'string') { cents = cents.replace('.',''); } | |
| var value = ''; | |
| var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/; | |
| var formatString = (format || this.money_format); |
| # Install QEMU OSX port with ARM support | |
| sudo port install qemu +target_arm | |
| export QEMU=$(which qemu-system-arm) | |
| # Dowload kernel and export location | |
| curl -OL \ | |
| https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie | |
| export RPI_KERNEL=./kernel-qemu-4.1.7-jessie | |
| # Download filesystem and export location |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Http\Response; | |
| use Symfony\Component\DomCrawler\Crawler; | |
| class PjaxMiddleware |