Skip to content

Instantly share code, notes, and snippets.

View lucas-pelton's full-sized avatar

Lucas Pelton lucas-pelton

View GitHub Profile
.leaflet-popup-content-wrapper {
background-color:#FFFFFF;
background-color: rgba(255,255,255,.7);
background: transparent\9; /* clear current background for ie */
zoom:1; /* required for the filters */
/* For IE 5.5 - 7*/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7FFFFFFF, endColorstr=#7FFFFFFF);
/* For IE 8*/
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#7FFFFFFF, endColorstr=#7FFFFFFF)";

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.

@lucas-pelton
lucas-pelton / wp-members-pluggable.php
Last active December 25, 2015 16:59
Functions to add to wp-members-pluggable.php to create a situation where you log in to Wordpress using email address instead of username.
<?php
/**
* WP-Members Pluggable Functions
*
* These functions replace those in the wp-members plugin
*
*/
add_filter( 'wpmem_inc_login_args', 'wpmem_inc_login_args_filter' );
if ( ! function_exists( 'wpmem_inc_login_args_filter' ) ):
@lucas-pelton
lucas-pelton / Wordpress plugin Categories Images
Last active January 1, 2016 22:28
Small change to Wordpress plugin Categories Images.Use thumbnails, rather than full-size images, on category listing page in WP admin.
/**
* Thumbnail column value added to category admin.
*
* @access public
* @param mixed $columns
* @param mixed $column
* @param mixed $id
* @return void
*/
function z_taxonomy_column( $columns, $column, $id ) {
@lucas-pelton
lucas-pelton / css3Parallax.js
Created October 29, 2015 17:24
Simple, smooth parallax with css transforms
var parallaxDivs = document.getElementsByClassName("parallaxBG");
var updateSize = function() {
updateScroll();
}
var updateScroll = function() {
@lucas-pelton
lucas-pelton / functions.php
Created December 3, 2015 20:31
Remove Vantage-added components from Page Builder
add_action ('init', 'lp_remove_vantage_row_options_from_pagebuilder',12);
add_action ('admin_head', 'lp_remove_vantage_row_options_from_pagebuilder',12);
function lp_remove_vantage_row_options_from_pagebuilder() {
remove_filter('siteorigin_panels_prebuilt_layouts', 'vantage_prebuilt_page_layouts');
remove_filter('siteorigin_panels_row_styles', 'vantage_panels_row_styles');
remove_filter('siteorigin_panels_row_style_fields', 'vantage_panels_row_style_fields', 11);
remove_filter('siteorigin_panels_row_style_attributes', 'vantage_panels_panels_row_style_attributes', 10, 2);
remove_filter('siteorigin_panels_row_attributes', 'vantage_panels_panels_row_attributes', 10, 2);
remove_filter('siteorigin_panels_widgets', 'vantage_panels_add_widget_groups');
@lucas-pelton
lucas-pelton / 0_reuse_code.js
Created December 12, 2015 13:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lucas-pelton
lucas-pelton / .htaccess
Created November 11, 2016 00:48
Silent rewrite to grab static content based on subdomain
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC]
# RewriteCond %{HTTP_COOKIE} !atomic-show-full-site=true [NC]
RewriteCond %{SERVER_NAME} ^m.thisisatotal.cf$ [NC]
RewriteCond %{REQUEST_FILENAME} !^favicon.ico$ [NC]
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule ^ /mobile.html [NC,L]
</IfModule>
@lucas-pelton
lucas-pelton / post.js
Created December 7, 2016 05:58
JS function to navigate to a URL and include a POST array
function post(path, params, method) {
method = method || "post"; // Set method to post by default if not specified.
// The rest of this code assumes you are not using a library.
// It can be made less wordy if you use one.
var form = document.createElement("form");
form.setAttribute("method", method);
form.setAttribute("action", path);
for(var key in params) {
prefix="<?php
/**#@+
Authentication Unique Keys and Salts.
Change these to different unique phrases!
You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*/"
for salt in `find ./ -name wp-salt.php`; do echo "$prefix" > $salt; curl https://api.wordpress.org/secret-key/1.1/salt/ >> $salt; done