Skip to content

Instantly share code, notes, and snippets.

View mattclements's full-sized avatar

Matt Clements mattclements

View GitHub Profile
@mattclements
mattclements / zz_secure_ssl.conf
Last active August 29, 2015 14:06
Apache PCI Level SSL Ciphers
SSLProtocol All -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT
@mattclements
mattclements / style.css
Created July 21, 2014 21:22
Expanding Widgets - Sample CSS
.expand-section-title {
padding: 5px;
border-top: 1px #ccc solid;
}
.expand-section-title:first-of-type {
border-top: none;
}
.expand-section-title a {
.expand-section-title {
padding: 5px;
border-top: 1px #ccc solid;
}
.expand-section-title:first-of-type {
border-top: none;
}
.expand-section-title a {
.expand-section-title {
padding: 5px;
}
.expand-section-content {
display: none;
padding: 5px;
}
.expand-section-content.active {
@mattclements
mattclements / dns_checker.php
Last active September 10, 2016 07:20
DNS Migration Checker
<?php
/**
* Script in order to compare a set of DNS Records from the current DNS supplier, to a new Name Server
* A standard array of records are setup, and can be enabled/disabled as required, and altered
* Then set a domain, and new Name Server to check against, and run the script in CLI PHP
* ./dns_checker.php
*
* This will create a HTML file in your current folder with details of the checks.
*
* N.B. You must have Net_DNS2 PEAR module installed 'pear install Net_DNS2'
@mattclements
mattclements / example.php
Created April 6, 2014 16:00
RS PHP Issue
<?php $tickets_results = $ZendeskAPI->call('/organizations/'.$client_id.'/tickets.json', $values, 'GET'); ?>
@mattclements
mattclements / MattClements.geojson
Created February 21, 2014 22:54
Matt Clements
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattclements
mattclements / gist:8163509
Created December 28, 2013 20:01 — forked from mwaterfall/gist:953657
Runtime iOS Version Checking
/*
* System Versioning Preprocessor Macros
*/
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
@mattclements
mattclements / setup-urls.php
Last active December 30, 2015 17:49
Magento - Setup Product URL's after Import
<?php
require 'app/Mage.php';
Mage::app();
$amount = 0;
$model = Mage::getModel('catalog/product');
$products = $model->getCollection();
foreach ($products as $product) {
$model->load($product->getId());
$product->setUrlKey($model->getName())->save();
set_time_limit();
$_SESSION['UniqueRefMaxLength']