Skip to content

Instantly share code, notes, and snippets.

View panoply's full-sized avatar
🥛
Rich in the hood

ΝΙΚΟΛΑΣ panoply

🥛
Rich in the hood
View GitHub Profile
@panoply
panoply / toggle-grid.html
Created September 11, 2014 08:26
Grid toggle Bootstrap columns
<!-- The grid links, change the grid column sizes
with the below addition. Style as required -->
<ul class="list-inline grid-toggle">
<li><h5>GRID:</h5></li>
<li><a class="six" href="#">6</a></li>
<li><a class="four" href="#">4</a></li>
<li><a class="three" href="#">3</a></li>
<li><a class="two" href="#">2</a></li>
</ul>
@panoply
panoply / resize.js
Created August 15, 2015 16:35
Tictail - Image src resize in mobile
// # Tictail Product Image resize
//
// Use on themes that dont use the "mobile optimized layout" feature on tictail.
// The code resizes the products <img src=""> to lower resolution images.
// When document is ready preform the following actions:
//
$(function () {
if (window.matchMedia("(max-width:768px)").matches) {
$('.lazy').attr('data-original',function(i,e){
@panoply
panoply / Preferences.sublime-settings.js
Last active June 28, 2016 21:54
Reference - Sublime preferences and modified dreamweaver theme.
{
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Monokai Soda (SL).tmTheme",
"detect_indentation": true,
"draw_white_space": "all",
"enable_tab_scrolling": true,
"fade_fold_buttons": false,
"find_selected_text": true,
"font_face": "Courier New",
"font_options": "subpixel_antialias",
@panoply
panoply / force-ssl.js
Last active December 15, 2015 18:19
Force SSL Shopify
// Add the following code between the <head> tags in the theme.liquid file.
if (window.location.protocol != "https:")
window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
@panoply
panoply / TT-discounts.js
Last active January 2, 2016 22:59
Tictail Normalize - Discounts
(function($) {
$.fn.TTprices = function(options){
// Default Settings
//
var settings = $.extend({
threshold : 1000, // Default price threshold (sek)
discount : 50, // Discount percentage (%)
exclude : [] // Products to exclude
}, options);
@panoply
panoply / gulp-app-shopify.js
Last active March 17, 2016 23:56
Gulp stream for building Shopify Apps on Laravel 5
// Gulp plugin setup
var gulp = require('gulp');
// Gulp Ruby for local build
var sass = require('gulp-ruby-sass');
// Merge Streams
var merge = require('merge-stream');
// Bower Components
@panoply
panoply / .htaccess-shopify-proxy
Last active May 29, 2016 23:09
.htaccess rewrite for Laravel 5 with Shopify Proxy on using a Fortrabbit domain.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Addition: Force SSL
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@panoply
panoply / gulp-shopify-theme.js
Last active December 16, 2019 15:37
Gulp stream for theme building. The stream relies on a specific directory structure.
//=====================================================//
//## PLUGINS
//=====================================================//
// Gulp plugin setup
var gulp = require('gulp');
// Gulp Plumber for Error control
var plumber = require('gulp-plumber');
@panoply
panoply / iTerm Hide.md
Last active May 7, 2016 20:36
Hide and Show iTerm in dock and tab/switch

iTerm – Hide and Show

Hide:

/usr/libexec/PlistBuddy -c "Add :LSUIElement bool true" /Applications/iTerm.app/Contents/Info.plist

Show:

/usr/libexec/PlistBuddy -c "Delete :LSUIElement" /Applications/iTerm.app/Contents/Info.plist

@panoply
panoply / dash-menu.html
Created May 9, 2016 01:58
Horizontal menu with dash separators.
<ul class="dash">
<li class="active">
<a href="#"> One
</a>
</li>
<li>
<a href="#">
Two
</a>