Skip to content

Instantly share code, notes, and snippets.

View drawcard's full-sized avatar
👍

Drawcard drawcard

👍
  • Drawcard
  • Australia
View GitHub Profile
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
# ---- DB Search-Replace and Backup Script ----
# Note: This requires WP-CLI to be installed http://wp-cli.org/
#
# This will generate new SQL file for import to new URL
# 1. Old DB - for Backup purpose (old URL): backup-yymm.sql
# 2. Replaced DB - ready for deploy (new URL): replaced-yymm.sql
#
# Replace aaa.com to bbb.com in the script below
#
# Note: Sometimes you need to change permission with
@retlehs
retlehs / header.php
Created April 29, 2015 04:55
Sage header template for Bootstrap top navbar component
<?php
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker
// somewhere in your theme.
?>
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
@phlbnks
phlbnks / wp.sh
Last active June 6, 2022 09:07 — forked from bgallagh3r/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@codeablehq
codeablehq / backup.sh
Last active July 3, 2017 07:07
A script that creates a backup of your WordPress site and uploads it to Dropbox
#!/bin/bash
# For this script to work, save it somewhere in the executable path, like /usr/local/sbin/backup.sh
# make it executable: chmod +x /usr/local/sbin/backup.sh
# then add it to cron: crontab -e
# and add the line below, which will run backup 3am each day, then upload to Dropbox
# 0 3 * * * /usr/local/sbin/backup.sh > /dev/null 2>&1
# You also need WP CLI installed: http://wp-cli.org/
@rosemarydotworld
rosemarydotworld / Starting Recipe
Last active October 20, 2016 05:55
How does Liam start projects? Let's find out!
* Reset (either normalize.css or Eric Meyer's reset.css)
* Bourbon
* Neat
* Variables
* Standard colors (go for $red instead of $error)
* Standard sizes
* Font stacks
* Standard media query parameters (named)
* Utilities/
@brock
brock / nodereinstall.sh
Last active April 17, 2024 08:26
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@bullrico
bullrico / breakpoints.scss
Last active March 26, 2017 18:00
Media breakpoints for Bourbon and Neat
// Columns
$mobile-portrait-columns: 4;
$mobile-landscape-columns: 4;
$tablet-portrait-columns: 8;
$tablet-landscape-columns: 8;
$desktop-columns: 12;
// Portrait

How to setup your VMWare Fusion 6 images to use static IP addresses on Mac OS X

At Crush + Lovely, we use Railsmachine's Moonshine to automate the configuration of our servers. When writing our deployment recipes, VMWare Fusion's ability to take snapshots and rollback to these snapshots is a huge timesaver because it takes just seconds to roll a server image to it's original state.

When you're just configuring a single server, having a static IP address for your server image isn't too important, but when you're configuring multi-server setups, it can be useful to duplicate a number of server images and give each a static IP address so you can consistently deploy to them. While not documented well at all, it turns out that this is relatively easy to accomplish in four simple steps.

1. Determine the MAC address of your guest machine

Let's say you have a guest machine with the name ubuntu-lucid-lynx-base