Skip to content

Instantly share code, notes, and snippets.

View jmsmrgn's full-sized avatar
🚀

James Morgan jmsmrgn

🚀
View GitHub Profile
@go717franciswang
go717franciswang / greaseMonkyGmailGadgetRemoval.js
Last active August 29, 2015 14:06
GreaseMonkey: remove Gmail gadgets
// ==UserScript==
// @name Remove Gmail gadgets
// @namespace chiefFrabricator
// @include https://mail.google.com/mail/u/0/*
// @version 5
// @grant none
// @updateURL https://gist.githubusercontent.com/go717franciswang/9585565ece0b3c0d435f/raw/greaseMonkyGmailGadgetRemoval.js
// @downloadURL https://gist.githubusercontent.com/go717franciswang/9585565ece0b3c0d435f/raw/greaseMonkyGmailGadgetRemoval.js
// ==/UserScript==
@smhmic
smhmic / index.html
Created October 22, 2012 20:03
CSS Atom animation
<div class="container">
<div class="wrap">
<div class="circle horizontal c1">
<div class="wrap-electron">
<div class="circle electron"></div>
</div>
</div>
<div class="circle vertical c1">
<div class="wrap-electron">
<div class="circle electron"></div>
@jhned
jhned / Custom Taxonomy Rewrite Example
Created February 5, 2013 20:40
Example of a rewrite rule for a custom taxonomy.
register_taxonomy('type', 'work', array(
'labels' => array(
'name' => 'Types'
, 'singular_name' => 'Type'
, 'search_items' => 'Search Types'
, 'edit_item' => 'Edit Type'
, 'add_new_item' => 'Add New Type'
)
, 'hierarchical' => true
, 'query_var' => true
@lewismcarey
lewismcarey / WORDPRESS WP Query Taxonomy and Meta Query
Last active May 2, 2016 13:11
WORDPRESS WP Query Taxonomy and Meta query shorthand/longhand methods
# WORDPRESS WP Query Taxonomy and Meta query
This shows the two alternate methods to running taxonomy and post meta paramaters within WP Query.
* Shorthand version only accepts one postmeta key
* Longhand version is the full method and has much more flexiblity for complex queries
@d33pfri3d
d33pfri3d / index.html
Created October 21, 2012 14:17
Sticky Footer
<div id="wrapper">
Stuff goes here.
<div id="footer_push"></div>
</div>
<footer>
<p>This is my footer</p>
</footer>
@furf
furf / validBrackets.js
Created May 19, 2013 18:03
Given a string of brackets/parantheses, check if the string is valid. ex: [[]] is valid, ][][ is not valid. How would you solve if the parantheses could be of different types like {, [, (?
function validBrackets (brackets) {
var counts = {
'(': 0,
'[': 0,
'{': 0
},
pairs = {
')': '(',
@mirisuzanne
mirisuzanne / type.scss
Created September 2, 2012 17:24
Using modular scale with vertical rhythms
// Using the Modular Scale plugin along with Compass Vertical Rhythms module.
// The goal is to use MS to give us the values,
// and use VR to apply those values to our typography.
// ---------------------------------------------------------------------------
// Defaults
$base-size: 24px;
$ratio: major-third() fifth();
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Comments</title>
<?php
/**
* Method of listing upcoming events, complete with functional pagination
* if WP-PageNavi is installed.
*
* Implemented as a shortcode.
*
* @see https://wordpress.org/plugins/wp-pagenavi/
*/
function do_easy_event_list() {
@timwco
timwco / instructions.md
Last active September 29, 2018 00:23
How to use Bourbon, Neat, Bitters and Refills in a Yeoman app with Bower.

Your bower_components folder should be outside of your /app folder. Otherwise you'll need to modify the paths below.

  • Scaffold your Yeoman App
  • Install Bourbon, Neat & Bitters
    • bower install bourbon
    • bower install neat
    • bower install bitters
  • In your app/stylesheets/main.scss include the assets in this order
@import '../../bower_components/bourbon/dist/bourbon';