Skip to content

Instantly share code, notes, and snippets.

View jimmynotjim's full-sized avatar
☀️
Enjoying SoCal "Fall"

Jimmy Wilson jimmynotjim

☀️
Enjoying SoCal "Fall"
View GitHub Profile
@ericrasch
ericrasch / TypeKit embed code.php
Last active July 4, 2017 03:54
Different methods for loading TypeKit's embed code.
<?php
/**
* TypeKit's default embed code.
* Source: http://help.typekit.com/customer/portal/articles/649336-embed-code
* Avg. Load Time: 191ms; 198ms; 265ms
*/
?>
<script type="text/javascript" src="//use.typekit.net/xxxxxxx.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@nternetinspired
nternetinspired / gist:7482445
Last active February 24, 2022 17:20
Load Disqus comments only on demand if you give a shit about page weight and your visitors. Even with no comments, i.e. an empty comment form, calling Disqus will load an extra 226Kb. If your page has comments this can be far higher. This Gist accompanies my blog post: http://internet-inspired.com/wrote/load-disqus-on-demand/
// Requires jQuery of course.
$(document).ready(function() {
$('.show-comments').on('click', function(){
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username.
// ajax request to load the disqus javascript
$.ajax({
type: "GET",
url: "http://" + disqus_shortname + ".disqus.com/embed.js",
dataType: "script",
@marcamos
marcamos / Gruntfile.js
Last active January 16, 2018 19:51
Learning Grunt by writing a verbose Gruntfile that replaces (and, goes beyond) what we're used to with CodeKit.
module.exports = function(grunt) {
"use strict";
// -------------------------------------------------------------------------
// #### Load plugins as needed ####
// Using a 'just in time' approach -- meaning: only load plugins when they
// are needed -- this will automatically find, then load, any and all
// plugins that are needed by the task currently being executed. It will
// scan the devDependencies object, in package.json, and match any of the
@wilmoore
wilmoore / Gruntfile.small.coffee
Last active December 28, 2015 02:09
Modular Gruntfile Examples
module.exports = (grunt) ->
####################################################
# diagnostic
####################################################
# use if `--time` is present
require('time-grunt')(grunt) if grunt.option 'time'
####################################################
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
@millermedeiros
millermedeiros / osx_setup.md
Last active April 12, 2024 12:40
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@ericclemmons
ericclemmons / functions.php
Last active June 23, 2023 01:47
Auto-activate WordPress Plugins
<?php
// Add to: path/to/wp-content/wp-themes/your-theme/functions.php
/**
* Activate required plugins
*/
include_once ( ABSPATH . 'wp-admin/includes/plugin.php' );
@joshdcomp
joshdcomp / Shame Rules
Created April 22, 2013 15:51
Rules of shame
// -----------------------------------------------------------------------------
/* Shame CSS */
// This is not a dumping ground. It is a staging area for hacks that are
// intended to be fixed and resolved so as not to sully our
// production-ready codebase. Hacks are necessary, but they are not
// permanent, nor are they acceptable long-term. You are not done when
// you've moved your selector and rules here.
// This is not intended to be an easy fix, or a simple way out. You will
// spend time writing out your shame, and you will make it known that