Skip to content

Instantly share code, notes, and snippets.

View drewrawitz's full-sized avatar

Drew Rawitz drewrawitz

View GitHub Profile
@bitjockey42
bitjockey42 / mopidy.md
Created April 20, 2014 16:39
An installation and setup guide for mopidy on Arch Linux.

Mopidy on Arch Linux

mopidy

Installation

Install from the AUR.

@kjbrum
kjbrum / wp-automated-cache-busting.php
Last active January 15, 2022 19:31
Automated Cache Busting. This works by adding the file's change time to the end of the URL (last argument of the call)
<?php
/* For Themes */
wp_enqueue_style('slug', get_template_directory_uri().'/css/slug.css', array(), filemtime(get_template_directory().'/css/slug.css'));
wp_enqueue_script('slug', get_template_directory_uri().'/js/slug.js', array(), filemtime(get_template_directory().'/js/slug.js'));
/* For Plugins */
wp_enqueue_style('slug', plugin_dir_url(__FILE__).'css/slug.css', array(), filemtime(plugin_dir_path(__FILE__).'css/slug.css'));
wp_enqueue_script('slug', plugin_dir_url(__FILE__).'js/slug.js', array(), filemtime(plugin_dir_path(__FILE__).'js/slug.js'));

Git Cheat Sheet

Commands

Getting Started

git init

or

@paulirish
paulirish / bling.js
Last active July 23, 2024 14:51
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
@kieranmv95
kieranmv95 / _arrow.scss
Last active April 27, 2018 04:11
Create pure CSS triangles in a matter of seconds with this scss mixin
/*
Kieran Venison scss mixin
kieranmv95@gmail.com
Example usage: http://codepen.io/Kieranmv95/pen/QNYLvE
*/
// Name: Arrow
// Params: direction, color, size
@mixin arrow($arrow-direction, $arrow-color, $arrow-size){