Skip to content

Instantly share code, notes, and snippets.

View mcheck's full-sized avatar

Michael Check mcheck

View GitHub Profile
sub vcl_recv {
if (req.url ~ "^/(cart|my-account|checkout|addons)") {
return (pass);
}
if (req.url ~ "\?add-to-cart=") {
return (pass);
}
}
sudo apt-get update
sudo apt-get install -y libssl1.0.0 openssl
# Confirm Build Date is at least Aril 7th 2014
openssl version -a
# Restart all services listed by this command:
sudo lsof -n | grep ssl | grep DEL
@mcheck
mcheck / functions.php
Created June 3, 2014 00:15
Override uberstore-wp header cart in a child theme Add the functions.php command to your child theme functions.php Add the uberstore-overrides.php to your child theme (I put mine in a dir called functions/) Rename your function at the YOURPROJECT name
<?php
/**
*
* add this to functions.php in your child theme
*
**/
include( get_stylesheet_directory() . '/functions/uberstore-overrides.php');
add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 );
function dm_prevent_update_check( $r, $url ) {
if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) {
$my_plugin = plugin_basename( __FILE__ );
$plugins = unserialize( $r['body']['plugins'] );
unset( $plugins->plugins[$my_plugin] );
unset( $plugins->active[array_search( $my_plugin, $plugins->active )] );
$r['body']['plugins'] = serialize( $plugins );
}
return $r;
@mcheck
mcheck / template-part-head.php
Last active August 29, 2015 14:07
nav_walker language example
<div class="container dmbs-container">
<div class="row dmbs-header">
<div class="col-md-12" id="topstrip">Your Source for Health Reform<span class="pull-right"><span class="glyphicon glyphicon-globe"></span> Languages</span>
<div id="LanguagesContainer" class="clearfix">
<div style="display:inline-block;position:absolute;top:-6px;"><img src="http://illinoishealthmatters.org/wp-content/uploads/2013/10/globeB-sm.png" width="24" height="24" /></div>
<?php $args = array(
* keep people working on internal projects, assign and schedule the work
* dont look desperate, dont have immediate availability
* can tell a client you can 'shuffle internal projects' to accomodate them
* online ads dont work well
* referrals instead
* do a great job every single time
* voice calls important
* when people call you call them back
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
wget --mirror -p --html-extension --convert-links www.example.com
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.grid {
width: 99%;
margin-left: auto;
margin-right: auto;

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.