Skip to content

Instantly share code, notes, and snippets.

<h1>Don't Overthink It Grids <em>(while we wait for flexbox)</em></h1>
<div class="grid">
<div class="col-2-3">
<div class="module">
<h3>2/3</h3>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
</div>
</div>
<div class="col-1-3">
@travisward
travisward / index.html
Created August 15, 2012 19:12
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- IF PEN IS PRIVATE -->
<!-- <meta name="robots" content="noindex"> -->
<!-- END -->
@travisward
travisward / Three Column Layout
Created June 27, 2012 15:05
How to make a three-column content area.
<div class="one-of-3">It was created in 1841 from Robertson
and Washington counties and named Navasota, then renamed in
1842 as Brazos for the Brazos River.</div>
<div class="two-of-3">It was created in 1841 from Robertson
and Washington counties and named Navasota, then renamed in
1842 as Brazos for the Brazos River.</div>
<div class="three-of-3">It was created in 1841 from Robertson
and Washington counties and named Navasota, then renamed in
@travisward
travisward / Two Column Area
Created June 27, 2012 14:54
How to make a two-column content area.
<div class="one-of-2">It was created in 1841 from Robertson
and Washington counties and named Navasota, then renamed in
1842 as Brazos for the Brazos River. It’s county seat is
Bryan. Other towns include College Station, Kurten,
Millican, Welborn and Wixon Valley.</div>
<div class="two-of-2">It was created in 1841 from Robertson
and Washington counties and named Navasota, then renamed in
1842 as Brazos for the Brazos River. It’s county seat is
Bryan. Other towns include College Station, Kurten,
<input id="gwProxy" type="hidden" />
<input id="jsProxy" onclick="if(typeof(jsCall)=='function'){jsCall();}else{setTimeout('jsCall()',500);}" type="hidden" />
@travisward
travisward / Add obscurity
Created May 24, 2012 19:32
Some folks like to hide the 'meat' of their wp-config files
include('/var/www/vhosts/domain.com/filename.php');
/** WordPress likes the language defined here */
define ('WPLANG', '');
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
@travisward
travisward / Make an upgrade directory
Created May 24, 2012 19:31
Might also have to manually create your upgrade directory depending on your permission scheme
cd wp-content
mkdir upgrade
chown apache:apache upgrade
chown apache:ftp plugins -R
@travisward
travisward / activate SFTP
Created May 24, 2012 19:30
activate SFTP for secure WordPress updating
define('FTP_SSL', true);
@travisward
travisward / New constants for wp-config
Created May 24, 2012 19:28
Easy, secure updates for your WordPress MU site
define('FS_METHOD', 'direct');
define('FS_CHMOD_DIR', 0777);
define('FS_CHMOD_FILE', 0777);
define('FTP_BASE', '/var/www/vhosts/domain.com/httpdocs');
define('FTP_CONTENT_DIR', '/var/www/vhosts/domain.com/httpdocs/wp-content/');
define('FTP_PLUGIN_DIR ', '/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/');
define('FTP_PUBKEY', '/home/wp-updater/.ssh/id_rsa.pub');
define('FTP_PRIKEY', '/home/wp-updater/.ssh/id_rsa');
define('FTP_USER', 'wp-updater');
define('FTP_HOST', '255.255.255.255:22'); // your server's ip
@travisward
travisward / Make a user and a key
Created May 24, 2012 19:26
Media Temple DV user and key creation for secure WordPress MU updates
groupadd wp-updater
useradd -g wp-updater -d /home/wp-updater -m wp-updater
su wp-updater
ssh-keygen
cp /home/wp-updater/.ssh/id_rsa.pub /home/wp-updater/.ssh/authorized_keys
chmod 755 /home/wp-updater/.ssh
chmod 644 /home/wp-updater/.ssh/*