Skip to content

Instantly share code, notes, and snippets.

Leland Smith lelandsmith

Block or report user

Report or block lelandsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lelandsmith /
Created Sep 25, 2018 — forked from hofmannsven/
Virtual Hosts with MAMP on OS X

Virtual Hosts

Update the hosts file in /etc/hosts to maintain multiple domains/hostnames on a local machine for and setup a VirtualHost container in /Applications/MAMP/conf/apache/extra/httpd-vhost.conf via /Applications/MAMP/conf/apache/httpd.conf for a name-based virtual host.

Only suitable for MAMP users under OS X Lion, OS X Mountain Lion, and OS X Mavericks on Apache-Port 80 and MySQL-Port 3306.

lelandsmith / wp-config.php
Created Sep 25, 2018 — forked from ifamily/wp-config.php
A universal WordPress wp-config.php which works on local development to staging and production server environments.
View wp-config.php
One wp-config for local development to staging to production.
// Define Environments
$environments = array(
View Custom Trigger Event
/* place inside function */
/* call custom event */
$(document).bind('OverlayBoxonOpen', function () { alert('test') });
View animations.js
$("p").on("myOwnEvent", function(event, showName){
$(this).text(showName + "! What a beautiful name!").show();
$("p").trigger("myOwnEvent", ["Anja"]);
lelandsmith /
Created Feb 16, 2018 — forked from joyrexus/
Vanilla JS equivalents of jQuery methods

Sans jQuery


// jQuery
$(document).ready(function() {
  // code
lelandsmith / app.js
Last active Feb 16, 2018 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
View app.js
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.get('/', function(req, res) {
View Wordpress Localhost FTP Connection

Bypass Wordpress Localhost FTP Connection Information

Do chown / chmod wordpress folder:

    $ sudo chown -R :_www wordpress
    $ sudo chmod -R g+w wordpress

Add the following line into wp-config.php:

View Less Media Queries
@mobile-max: ~"only screen and (max-width: 550px)";
@tablet: ~"only screen and (min-width: 768px) and (max-width: 991px)";
@tablet-max: ~"only screen and (max-width: 767px)";
@tablet-min: ~"only screen and (min-width: 768px)";
@desktop: ~"only screen and (min-width: 992px) and (max-width: 1199px)";
@desktop-min: ~"only screen and (min-width: 992px)";
@desktop-max: ~"only screen and (max-width: 991px)";
@desktop-11-min: ~"only screen and (min-width: 1100px)";
@desktop-11-max: ~"only screen and (max-width: 1100px)";
@desktop-xl-min: ~"only screen and (min-width: 1200px)";
View margin_class
.mb20 {margin-bottom: 20px;}
.mb50 {margin-bottom: 50px;}
.mb100 {margin-bottom: 75px;}
.mb100 {margin-bottom: 100px;}
.mt20 {margin-top: 20px;}
.mt50 {margin-top: 50px;}
.mt100 {margin-top: 75px;}
.mt100 {margin-top: 100px;}
View gist:7403821366fa129fb96310eb8e6d05db
<div class="row">
<div class="col-md-12">
<span class="pull-right">
<?php next_post_link(); ?>
<span class="pull-left">
<?php previous_post_link(); ?>
You can’t perform that action at this time.