Skip to content

Instantly share code, notes, and snippets.

{
"order/properties-order": [
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"float",
"clear",
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 2.1.1
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
INFO global: Plugins:
/opt/vagrant/embedded/lib/ruby/2.3.0/psych.rb:379:in `parse': (<unknown>): did not find expected '-' indicator while parsing a block collection at line 17 column 5 (Psych::SyntaxError)
from /opt/vagrant/embedded/lib/ruby/2.3.0/psych.rb:379:in `parse_stream'
from /opt/vagrant/embedded/lib/ruby/2.3.0/psych.rb:327:in `parse'
from /opt/vagrant/embedded/lib/ruby/2.3.0/psych.rb:254:in `load'
from /home/xan/Develop/homestead/Vagrantfile:28:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:125:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:119:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:119:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/lib/vagrant/config/loader.rb:116:in `each'
@octoxan
octoxan / _bigger-grid.scss
Created January 11, 2017 21:02
Fix for Bootstrap 4's grid system not having actual large screen size breakpoints
// Add two new breakpoints because Bootstrap is stupid by default
$grid-breakpoints: (
xs : 0,
sm : 576px,
md : 768px,
lg : 992px,
xl : 1200px,
xxl : 1400px,
xxxl: 1800px
) !default;
@octoxan
octoxan / pre-commit
Created November 17, 2016 17:49
Pre-commit git hook to check for console.log's and php syntax errors.
#!/bin/sh
exec 1>&2
exec < /dev/tty
git diff --cached --name-only | while read FILE; do
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then
if [[ -f $FILE ]]; then
php -l "$FILE" 1> /dev/null
if [ $? -ne 0 ]; then
echo -e "\e[1;31m\tAborting commit due to files with syntax errors.\e[0m" >&2
@octoxan
octoxan / Collection.php
Created October 12, 2016 13:55
Patch for Magento Attribute sort order (app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/)
<?php
/**
*
* Magento (has some problems)
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
@octoxan
octoxan / getPriceRange.php
Last active September 28, 2016 13:01
Magento 1.x getPriceRange Function
function getPriceRange($productId) {
$max = '';
$min = '';
$pricesByAttributeValues = array();
$product = Mage::getModel('catalog/product')->load($productId);
$attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
$basePrice = $product->getFinalPrice();
@octoxan
octoxan / table-to-csv.js
Created September 2, 2016 13:53
Export HTML Table as CSV
function exportTableToCSV($table, filename) {
var $rows = $table.find('tr:has(td),tr:has(th)'),
// Temporary delimiter characters unlikely to be typed by keyboard
// This is to avoid accidentally splitting the actual contents
tmpColDelim = String.fromCharCode(11), // vertical tab character
tmpRowDelim = String.fromCharCode(0), // null character
// actual delimiter characters for CSV format
@octoxan
octoxan / .stylelintrc
Last active March 17, 2017 14:16
StyleLint config file
{
"rules": {
"declaration-colon-space-after": "always",
"indentation": ["tab"],
"max-empty-lines": 2,
"color-hex-case": "lower",
"color-hex-length": "short",
"number-leading-zero": "never",
"comment-empty-line-before": null,
"at-rule-empty-line-before": null,
@octoxan
octoxan / readCookie.js
Created July 9, 2016 13:57
Read Cookie Function
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}