Skip to content

Instantly share code, notes, and snippets.

View colinmurphy's full-sized avatar

Colin Murphy colinmurphy

View GitHub Profile
@colinmurphy
colinmurphy / brew --config
Created May 5, 2014 18:42
Can't install any version of PHP with Homebrew on Mac OS X 10.9.2
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: b10c09b1746cd5673bff4e40c4485cb266b1932b
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
GCC-4.2: build 5666
@colinmurphy
colinmurphy / container.html
Last active September 18, 2015 14:41
Create an inverted triangle.
<div id="page-container" class="clearfix relative">
<div id="page-container-triangle" class="clearfix">
<div class="triangle"></div>
</div>
<div id="page-container-content" class"clearfix">
Insert content here ...
</div>
</div>
@colinmurphy
colinmurphy / loop._scss
Created February 19, 2016 08:32
Loops in SASS
// =============================================
// Background and Colors
// =============================================
@mixin background($color, $value) {
.bg-#{$color} {
background: $value;
}
}
@mixin color($color, $value) {
.color-#{$color} {
@colinmurphy
colinmurphy / update-descriptions-and-short-descriptions.sql
Last active March 24, 2016 14:41
Update empty descriptions and short descriptions with the title of the products
# Description
UPDATE catalog_product_entity_text as t
SET t.value = (
SELECT
v.value
FROM catalog_product_entity_varchar as v
WHERE v.entity_id = t.entity_id
AND v.store_id = t.store_id
AND v.attribute_id = 71
)
@colinmurphy
colinmurphy / backorders.sql
Created March 14, 2019 08:32
Shopware - Get Name and Ordernumber for Products that allow backorders
SELECT d.ordernumber,a.name
FROM s_articles_details as d
INNER JOIN s_articles as a ON (
d.articleID = a.id
)
WHERE d.laststock != 1;
@colinmurphy
colinmurphy / symlink.sh
Last active November 24, 2020 10:37
Fix Shopware symlink issue
@colinmurphy
colinmurphy / slack-file-upload.php
Created April 25, 2021 06:50
Upload a file to Slack API with PHP Guzzle
<?php
require_once "../vendor/autoload.php";
use GuzzleHttp\Client;
/**
* Notes:
*
* Tested with guzzlehttp/guzzle version 7.3