Skip to content

Instantly share code, notes, and snippets.

View micjamking's full-sized avatar
🏝️
Working remote

Mike King micjamking

🏝️
Working remote
View GitHub Profile
@micjamking
micjamking / README.md
Last active December 19, 2015 01:59
[HTML] Meta Tags for Mobile / Responsive Design

HTML Meta Tags for Mobile

Place the following tag in your <head>

<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />
@micjamking
micjamking / README.md
Last active April 25, 2018 13:52
[Git] Git-to-Github Workflow

Git Workflow

Below is our current practice for using Git (the technology) & Github (the repository) when collaborating on projects. This process assumes that you already have Git installed & configured, and there is an existing project repository on Github with a "development" branch already setup.

If you do not have Git installed, follow these instructions.

This process also assumes that you are using the command line, however most of these tasks can be performed with a desktop client like Github for Mac or Tower.

Process

Getting Started

1.) Open terminal and locate the project directory you wish to use.

@micjamking
micjamking / README.md
Last active January 2, 2016 23:59
[Apache] AMP Stack on OSX 10.9 Mavericks

Get your Local Web Development Server Up & Running on OSX 10.9 Mavericks

osx mavericks 10.9

With the new OS out of the bag, getting the AMP stack running on OSX 10.9 Mavericks is is pretty much the same as on OS X Mountain Lion 10.8. This tutorial will go through the process on getting Apache, MySQL, PHP and phpMyAdmin running on the new Maverick Californian driven OS.

If you had your local development already set up in OSX 10.8 and simply did an upgrade to 10.9, your MySQL, Apache and phpMyAdmin settings should all be good, you just need to enable PHP

@micjamking
micjamking / README.md
Last active October 24, 2017 05:29
[Command Line] Add Public SSH Key to Remote Server in a Single Command

Copy SSH Pubkey to Remote Server

$ cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'

Deploying Yeoman apps to Heroku

Prerequisites

This assumes you already have a Yeoman app and are ready for publishing

Build for Production

Create production directory & assets

@micjamking
micjamking / functions.php
Last active August 29, 2015 14:06
[WordPress] Add Custom Admin CSS
function admin_css() {
$path = get_template_directory_uri();
echo "<link rel='stylesheet' href='" . $path . "/admin.css' />";
}
add_action( 'admin_head', 'admin_css' );
@micjamking
micjamking / README.md
Last active August 29, 2015 14:06
[Command Line] Access Yeoman app in & from Parallels Windows 8 VM

Parallels Desktop 9 for Mac

  • Configure > Hardware > Network 1 > Type: Default Adapter
  • Preferences > Advanced > Network: Change Settings > select Shared and click 'Okay'

Grunt Server

  • In your app's Gruntfile.js, set connect server's hostname in the options to 0.0.0.0 to allow access to the server from outside
grunt.initConfig({
		// The actual grunt server settings
@micjamking
micjamking / index.html
Last active August 29, 2015 14:06
[HTML] Disable printing of images & right-click behavior
<head>
<!-- Disable print & right-click behavior -->
<style type="text/css" media="print"> img { display: none; } </style>
<script> document.oncontextmenu = new Function('return false'); </script>
</head>
@micjamking
micjamking / .htaccess
Last active August 29, 2015 14:06
[Apache] 301 Redirects
# Redirect individual files
Redirect 301 /oldfile.html /newfile.html