Skip to content

Instantly share code, notes, and snippets.

View slightlyoffbeat's full-sized avatar

Dan Brown slightlyoffbeat

View GitHub Profile
@jaydenseric
jaydenseric / zeit-now-g-suite-setup.md
Created March 20, 2017 04:46
Zeit Now G Suite setup

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
// Vanilla version of FitVids
// Still licencened under WTFPL
//
// Not as robust and fault tolerant as the jQuery version.
// It's BYOCSS.
// And also, I don't support this at all whatsoever.
;(function(window, document, undefined) {
'use strict';
@paulirish
paulirish / bling.js
Last active November 4, 2024 17:48
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;
@Fishrock123
Fishrock123 / gulp.js
Last active August 1, 2021 11:19
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
@jimmynotjim
jimmynotjim / _sassy_link_underlines.md
Last active October 6, 2020 15:44
Sassy Link Underlines
@halfempty
halfempty / functions.php
Last active December 17, 2015 12:19
WordPress Tag Search using jQuery. Demo and tutorial here: http://martyspellerberg.com/2011/11/creating-a-wordpress-tag-search-using-jquery/
<?php
function showalltags() {
$tags = get_tags();
$html;
foreach ($tags as $tag){
$tag_link = get_tag_link($tag->term_id);
$html .= "<a href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
@ozzieperez
ozzieperez / Flip Card with graceful degradation
Last active December 14, 2015 06:29
Flip Card With Graceful Degradation. Dependencies jQuery and Modernizr (can be optional). The only thing used from Modernizr is it looks for the "csstransforms3d" class to handle degradation.
<html class="csstransforms3d">
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
/* CARDS
*****************************************************/
.card {
/* styling */
width: 200px;
height: 200px;
@jareware
jareware / SCSS.md
Last active October 12, 2024 17:11
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@davewasmer
davewasmer / flat-boostrap-buttons.css
Created September 21, 2012 18:57
Flat Bootstrap buttons - no gradients, use only the flat colors from the variables.less file
.btn-primary { background: @btnPrimaryBackground; }
.btn-info { background: @btnInfoBackground; }
.btn-success { background: @btnSuccessBackground; }
.btn-warning { background: @btnWarningBackground; }
.btn-danger { background: @btnDangerBackground; }
.btn-inverse { background: @btnInverseBackground; }
.btn-primary:hover { background: @btnPrimaryBackgroundHover; }
.btn-info:hover { background: @btnInfoBackgroundHover; }
.btn-success:hover { background: @btnSuccessBackgroundHover; }
.btn-warning:hover { background: @btnWarningBackgroundHover; }
@retgef
retgef / wysiwyg-meta-box.php
Created September 10, 2011 02:06
How to add a Wordpress WYSIWYG editor to a meta box.
<?php
define('WYSIWYG_META_BOX_ID', 'my-editor');
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different
define('WYSIWYG_META_KEY', 'extra-content');
add_action('admin_init', 'wysiwyg_register_meta_box');
function wysiwyg_register_meta_box(){
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post');
}