Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ray Brown raybrownco

🏠
Working from home
View GitHub Profile
@borama
borama / compare_classes.rb
Last active Aug 25, 2022
A script to compare the classes in two CSS files. Useful for migrating utility CSS systems, such as Tachyons to Tailwind. Please find all the context here: https://dev.to/nejremeslnici/migrating-tachyons-to-tailwind-css-part-i-ich.
View compare_classes.rb
#!/bin/env ruby
# Compare classes between Tachyons & Tailwind
#
# Please read https://dev.to/nejremeslnici/migrating-tachyons-to-tailwind-css-part-i-ich for more context.
#
# To use this, do the following:
# Install css_parser gem (https://github.com/premailer/css_parser)
# - `gem install css_parser`
#
@IanColdwater
IanColdwater / twittermute.txt
Last active Sep 24, 2022
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ernsheong
ernsheong / access-mac-localhost-from-parallels-desktop-ie-edge.md
Last active Mar 3, 2022
Accessing macOS localhost from Parallels Desktop IE or Edge
View access-mac-localhost-from-parallels-desktop-ie-edge.md

Access macOS localhost from IE or Edge within Parallels Desktop

This issue is so infuriating that I'm going to take some time to write about it.

  1. MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local, hugo serve --bind 0.0.0.0. If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at 0.0.0.0.

  2. My Parallels setting is using Shared Network, nothing special there.

  3. Open macOS Terminal and type ifconfig. Look for the value under vnic0 > inet. It is typically 10.211.55.2.

@javierarques
javierarques / config.rb
Created Aug 22, 2017
Middleman 4 and Webpack 3 integration. Use Middleman with External Pipeline.
View config.rb
# ...
activate :external_pipeline,
name: :webpack,
command: build? ? "npm run build:assets" : "npm run start:assets",
source: ".tmp/webpack_output",
latency: 1
# ...
View inline-svg-function.scss
// Replace letters
@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@siamkreative
siamkreative / formspree-ajax-contact-form.js
Created Mar 30, 2016
A plain JavaScript AJAX Contact Form that is designed to work with http://formspree.io/
View formspree-ajax-contact-form.js
/**
* AJAX Form
* http://stackoverflow.com/a/13038218/1414881
*/
var form = document.getElementById('contact_form');
// Append the form status
var formStatus = document.createElement('div');
formStatus.setAttribute('class', 'form-status alert');
@natelandau
natelandau / .bash_profile
Last active Sep 22, 2022
Mac OSX Bash Profile
View .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
@brandonkelly
brandonkelly / templating.md
Last active Jul 29, 2022
Templating in EE vs. Craft
View templating.md
@don1138
don1138 / font-stacks.css
Last active Sep 17, 2022
CSS Modern Font Stacks
View font-stacks.css
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* System (Bootstrap 5.2.0) */
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
@tdreyno
tdreyno / easing.scss
Created May 7, 2011
Easing functions for Sass 3.1
View easing.scss
@function linear() {
@return cubic-bezier(0.250, 0.250, 0.750, 0.750); }
@function ease() {
@return cubic-bezier(0.250, 0.100, 0.250, 1.000); }
@function ease-in() {
@return cubic-bezier(0.420, 0.000, 1.000, 1.000); }
@function ease-in-quad() {
@return cubic-bezier(0.550, 0.085, 0.680, 0.530); }