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
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@cferdinandi
cferdinandi / extend.js
Last active August 17, 2023 23:26
A native JS extend() function.
/**
* Merge defaults with user options
* @private
* @param {Object} defaults Default settings
* @param {Object} options User options
* @returns {Object} Merged values of defaults and options
*/
var extend = function ( defaults, options ) {
var extended = {};
var prop;
@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' );
@stuntbox
stuntbox / gist:4557917
Last active March 23, 2023 03:32
Slightly smarter filtering to remove hard-coded width and height attributes from *all* images in WordPress (post thumbnails, images inserted into posts, and gravatars). Handy for responsive designs. Add the code below to the functions.php file in your theme's folder (/wp-content/themes/theme-name/ ). Remember to rename the function as needed to …
/**
* Filter out hard-coded width, height attributes on all images in WordPress.
* https://gist.github.com/4557917
*
* This version applies the function as a filter to the_content rather than send_to_editor.
* Changes made by filtering send_to_editor will be lost if you update the image or associated post
* and you will slowly lose your grip on sanity if you don't know to keep an eye out for it.
* the_content applies to the content of a post after it is retrieved from the database and is "theme-safe".
* (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.)
*
@eliotsykes
eliotsykes / ngFocusAndBlur.js
Created April 16, 2013 09:27
AngularJS ngFocus and ngBlur directives - one way to get them before they get released. Before using, consider re-naming ngFocus and ngBlur to something that doesn't invade the ng namespace, e.g. replace all 'ngFocus' and 'ngBlur' strings with 'ngcFocus' and 'ngcBlur' (where c = cats/custom).
app.directive('ngFocus', ['$parse', function($parse) {
return function(scope, element, attr) {
var fn = $parse(attr['ngFocus']);
element.bind('focus', function(event) {
scope.$apply(function() {
fn(scope, {$event:event});
});
});
}
}]);
@plapier
plapier / Typekit font mixin.scss
Created October 31, 2012 18:39
Sass Mixin for typekit variation-specific font-family names
Sass Mixin for typekit variation-specific font-family names
Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles)
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
// Must include fallbacks for EACH typekit font — set them each as variables
//************************************************************************//
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2]
@germanny
germanny / shortcode-include-file.php
Last active September 30, 2022 12:37
Shortcode to include files in WP Pages
<?php
// SHORTCODE - Include File
// http://www.amberpanther.com/knowledge-base/using-the-wordpress-shortcode-api-to-include-an-external-file-in-the-post-content/
function include_file($atts) {
//check the input and override the default filepath NULL
//if filepath was specified
extract(shortcode_atts(array('filepath' => 'NULL'), $atts));
//check if the filepath was specified and if the file exists
if ($filepath!='NULL' && file_exists(CHILD_SS_DIR.$filepath)){
@imathis
imathis / tweetbot-mute-regex.md
Created June 27, 2012 19:45
Tweetbot can use regular expressions to mute tweets in your timeline and mentions.

Hashtag abuse

Three or more hashtags.

#[^#]+#[^#]+#

Long hashtags (15+ characters): #hashtagpunchline

@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
@soffes
soffes / perferences.json
Created August 22, 2012 05:35
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],