Skip to content

Instantly share code, notes, and snippets.

View jewlofthelotus's full-sized avatar

Julie Cameron jewlofthelotus

View GitHub Profile
@rpearce
rpearce / install-script--personal.sh
Last active July 25, 2023 16:04
New Mac Install Script (Personal)
#!/bin/sh
###############################################################################
# Homebrew
###############################################################################
echo "Installing command line utilities"
# Check for Homebrew,
# Install if we don't have it
# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BorderZero:
@krisbulman
krisbulman / countCSSRules.js
Last active August 25, 2022 19:53 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE. — This snippet has been modified to count more than just the first level of CSSStyleRule objects within CSSMediaRule.
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@hagenburger
hagenburger / SassMeister-input.scss
Created December 9, 2013 17:17
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// You can use inline %placeholders in Sass:
.form %form-item + .text {
margin-top: 10px;
}
@umate
umate / image_uploader.rb
Last active December 3, 2023 03:05
CarrierWave gaussian blur filter using MiniMagick
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
version :blurred do
process :blur
end
def blur(radius=16)
manipulate! do |img|
original_path = img.path
@sheedy
sheedy / style-guides.md
Last active December 25, 2015 11:09
A list of "living" Style Guides

Style Guides

Add any links you want in this to the comments and I'll add them.

Grunt/JS/Handlebars

Generates styleguides from Markdown comments in CSS, SASS and LESS files using Handlebars

Node/JS

@micahgodbolt
micahgodbolt / sassbites5.scss
Created August 29, 2013 15:29
SassBites Episode #5
$animal: cat;
$tail: curl;
div {
@if $animal == 'cat' {
sound: meow;
}
@if $animal == 'dog' {
sound: woof;
}
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@kalisjoshua
kalisjoshua / .gitconfig
Last active December 16, 2015 18:59
My current .gitconfig.
[user]
name = Joshua T Kalis
email = kalisjoshua@gmail.com
[alias]
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
oldest-ancestor = !zsh -c 'diff -u <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | sed -ne \"s/^ //p\" | head -1' -
[core]
excludesfile = /Users/jkalis/.gitignore_global
[color]
branch = auto
@nickawalsh
nickawalsh / icons.sass
Last active October 7, 2021 09:38
Auto Hi-res Sprites
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd