Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
carolineschnapp / page.list-collections.liquid
Last active February 10, 2025 17:40
To add at the bottom of page.list-collections.liquid. In the New Standard theme, use the content of page.full-width.liquid and copy the code at the bottom of that content. This won't work in the Lookbook, Brooklyn, Simple and Kickstand themes.
{% comment %}
Collections are listed here.
{% endcomment %}
{% capture uses_minimal_framework %}{% include 'product-loop' %}{% endcapture %}
{% if uses_minimal_framework contains 'Liquid error' %}
{% assign uses_minimal_framework = false %}
{% assign grid_item_width = 'large--one-quarter medium--one-third small--one-half large--col-3 medium--col-4 small--col-6' %}
{% else %}
@edheltzel
edheltzel / ADD_SFTP_User.md
Last active December 2, 2024 07:56
Steps to create a new SSH user and SFTP user

How to add a SFTP user to your VM managed by ServerPilot control panel using Ubuntu 14.04

I am not a security expert, so take it for what its worth.

OpenSSH has this ability built in, few people just seem to use the feature. Below is what works for me, but if you have a better way please share the uninformed.

The Steps:

  1. First create a new app inside of the SP control panel
  2. Now, decide what direcoty you want to put the users directory; either `` or /public. This will keep trolls at bay.
@magicspon
magicspon / _tools-grid.scss
Created January 7, 2015 12:52
Gridset helper functions/mixins
// return the column width minus gutter
@function gs-width-no-marin($grid, $start, $end: false, $container: false, $unit: false) {
$output: gs-width($grid,$start,$end, $unit: false) + (gs-gutter($grid, $container: false, $unit:false) /2);
@if $unit = true {
$output: $output * 1%;
}
@return $output;
@magicspon
magicspon / font-size-input.scss
Last active August 29, 2015 14:10
Generated by SassMeister.com.
$base-font-size: 16px;
$base-line-height: 24px;
@function computeLineHeight($font-size, $computed) {
$fs: strip-units($font-size);
@return $computed / $fs;
}
@function strip-units($value) {
# Varnish 4.0 file for our Craft CMS projects
# Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;
<div>
<label for="sort-by">Sort by</label>
<select id="sort-by">
<option value="manual">Featured</option>
<option value="price-ascending">Price: Low to High</option>
<option value="price-descending">Price: High to Low</option>
<option value="title-ascending">A-Z</option>
<option value="title-descending">Z-A</option>
<option value="created-ascending">Oldest to Newest</option>
<option value="created-descending">Newest to Oldest</option>
@litzinger
litzinger / ee-route-example.php
Last active August 29, 2015 13:56
How to extend EE's new routes feature in an extension hook.
<?php
public function core_template_route($uri_string)
{
ee()->your_lib_or_model->load_routes();
// Rest of your hook processing, if any.
}
public function load_routes()
@brandonkelly
brandonkelly / templating.md
Last active March 11, 2025 21:41
Templating in EE vs. Craft
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@peteeveleigh
peteeveleigh / _tweets.html
Last active December 25, 2015 21:08
Snippet to use with Click Rain's EE_Twitter add-on for ExpressionEngine (available here https://github.com/click-rain/EE_Twitter)
{exp:twitter:user screen_name="YOURTWITTERNAME" limit="5"}
{if no_results}
<p>No tweets to display</p>
{/if}
<article class="row {if retweeted}retweet{/if}">
{if retweeted}
<div class="retweetedavatars">
<img class="avatar retweeter" src="{retweeter:profile_image_url}">
<img class="avatar source" src="{profile_image_url}">