Skip to content

Instantly share code, notes, and snippets.

View elricco's full-sized avatar
🍍
I’m sweet and fuzzy, like a lollipop on the carpet.

Tim elricco

🍍
I’m sweet and fuzzy, like a lollipop on the carpet.
View GitHub Profile
@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jareware
jareware / SCSS.md
Last active April 23, 2024 22:13
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

@johnnyopao
johnnyopao / confirmEmailValidation.html
Last active March 31, 2024 10:03
Confirm Email Validation
<script>
lp.jQuery(function($) {
var ruleID = 'emailMatch';
//The email field to check against
var firstEmailField = 'email';
//The second confirmation email field
@chris-sev
chris-sev / setup.sh
Last active February 10, 2024 03:17
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
@nathansmith
nathansmith / scroll-offset.js
Last active November 27, 2023 04:51
Check if the user is scrolled to the bottom of the page.
window.onscroll = function() {
var d = document.documentElement;
var offset = d.scrollTop + window.innerHeight;
var height = d.offsetHeight;
console.log('offset = ' + offset);
console.log('height = ' + height);
if (offset >= height) {
console.log('At the bottom');
@westonruter
westonruter / wp-42573.php
Last active September 21, 2023 13:41
WP Trac #42573: Fix for theme template caching. https://core.trac.wordpress.org/ticket/42573
<?php
/**
* Plugin name: WP Trac #42573: Fix for theme template file caching.
* Description: Flush the theme file cache each time the admin screens are loaded which uses the file list.
* Plugin URI: https://core.trac.wordpress.org/ticket/42573
* Author: Weston Ruter, XWP.
* Author URI: https://weston.ruter.net
*/
function wp_42573_fix_template_caching( WP_Screen $current_screen ) {
@gpessia
gpessia / Helvetica Neue stack
Created January 24, 2014 11:28
Helvetica Neue CSS font-family stack. Is there a web-safe Helvetica Neue CSS font-family stack? - See more at: http://rachaelmoore.name/posts/design/css/web-safe-helvetica-font-stack/#sthash.lt6rYYGz.dpuf
/**
* Helvetica Neue Normal (No Stretch)
*/
/* Helvetica Neue Black Font Stack */
.{font-family: "HelveticaNeueBlack", "HelveticaNeue-Black", "Helvetica Neue Black", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:800; font-stretch:normal;}
/* Helvetica Neue Heavy Font Stack */
.{font-family: "HelveticaNeueHeavy", "HelveticaNeue-Heavy", "Helvetica Neue Heavy", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosBold', "Arial Black", sans-serif; font-weight:700; font-stretch:normal;}
@paulirish
paulirish / performance.now()-polyfill.js
Last active August 1, 2023 15:42
performance.now() polyfill (aka perf.now())
// @license http://opensource.org/licenses/MIT
// copyright Paul Irish 2015
// Date.now() is supported everywhere except IE8. For IE8 we use the Date.now polyfill
// github.com/Financial-Times/polyfill-service/blob/master/polyfills/Date.now/polyfill.js
// as Safari 6 doesn't have support for NavigationTiming, we use a Date.now() timestamp for relative values
// if you want values similar to what you'd get with real perf.now, place this towards the head of the page
// but in reality, you're just getting the delta between now() calls, so it's not terribly important where it's placed
@victornpb
victornpb / v-tooltip.js
Last active July 6, 2023 06:28
Using Bootstrap tooltips in Vue.js with a simple directive
/**
* Enable Bootstrap tooltips using Vue directive
* @author Vitim.us
* @see https://gist.github.com/victornpb/020d393f2f5b866437d13d49a4695b47
* @example
* <button v-tooltip="foo">Hover me</button>
* <button v-tooltip.click="bar">Click me</button>
* <button v-tooltip.html="baz">Html</button>
* <button v-tooltip:top="foo">Top</button>
* <button v-tooltip:left="foo">Left</button>