Skip to content

Instantly share code, notes, and snippets.

View mikeislearning's full-sized avatar

Michael MacPherson mikeislearning

View GitHub Profile
@mikeislearning
mikeislearning / .vimrc
Created February 17, 2019 07:45
My .vimrc
autocmd! bufwritepost .vimrc nested source ~/.vimrc
" Gruvbox settings
set background=dark
" Make Vim more useful
set nocompatible
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
filetype off
" set the runtime path to include Vundle and initialize
@mikeislearning
mikeislearning / html
Created May 30, 2016 20:04
JS Breakout - May.30, 2016
<!doctype HTML>
<html>
<head>
</head>
<body>
<h1>score:<span id="my-score">0</span> </h1>
<button class='score-increaser'>+++++++</button>
<script src='main.js'></script>
</body>
@mikeislearning
mikeislearning / search.php
Created July 7, 2015 09:55
search.php file for thepeopledoctor
<?php get_header(); ?>
<div class="entry-title">
Results for: <?php echo esc_html(stripslashes($_GET['s']), true); ?>
</div>
<div class="search-results-content">
<div class="container">
<div class="row">
<div class="col-xs-12">
@mikeislearning
mikeislearning / functions.php
Last active August 29, 2015 14:24
Unable to filter with searchwp
# require_once('library/wp-advanced-search/wpas.php');
// Check for Taxonomy Term
function pa_in_taxonomy($tax, $term, $_post = NULL) {
if ( !$tax || !$term ) { return FALSE; }
if ( $_post ) {
$_post = get_post( $_post );
} else {
$_post =& $GLOBALS['post'];
}
@mikeislearning
mikeislearning / gist:6105be2239e3338fd06e
Created December 11, 2014 17:52
headless-drupal.make
; This file was auto-generated by drush make
core = 7.x
api = 2
projects[drupal][version] = "7.34"
; Modules
projects[views_bulk_operations][version] = "3.2"
projects[admin][version] = "2.0-beta3"
@mikeislearning
mikeislearning / gist:59cf3c292dcb9cfa8f7f
Created December 11, 2014 17:40
drupal7-basic.make
; Basic Drush Make file
;
; Usage:
; drush make --prepare-install drupal7.make
; Core version
; ------------
; Each makefile should begin by declaring the core version of Drupal that all
; projects should be compatible with.
@mikeislearning
mikeislearning / flip-cards.css
Last active August 29, 2015 13:59
Unlimited image flip card animation
.flip-card {
-webkit-transform-style: preserve3d;
-moz-transform-style: preserve3d;
-ms-transform-style: preserve3d;
-o-transform-style: preserve3d;
transform-style: preserve3d;
-webkit-transition: null 1s null;
-moz-transition: null 1s null;
-ms-transition: null 1s null;
-o-transition: null 1s null;
@mikeislearning
mikeislearning / gulpfile.js
Last active March 12, 2016 22:40
Basic Gulp setup for Ionic
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var open = require('open');
// Load plugins
var $ = require('gulp-load-plugins')();
@mikeislearning
mikeislearning / modal.html
Created August 14, 2013 15:02
My attempt at a modal box. The positioning is kind of weird though, I'm sure how to perfectly center it - requires jquery - uses sass/compass
<div id="overlay"></div>
<div id="modal">
<div id="content">
<div class="modal_header">
<h3> some title</h3>
<a href="#" id="modal-close"></a>
</div>
</div>
@mikeislearning
mikeislearning / Gruntfile.js
Last active December 20, 2015 03:48
My gruntfile and package.json so far: - download relevant grunt modules using 'npm install' - run grunt watch to do live reload and sass compiling - change directories to match your own
/*global module:false*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/*!\n' +
' * app.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +