Skip to content

Instantly share code, notes, and snippets.

@sethlopezme
sethlopezme / StepProgressBar.js
Last active August 29, 2015 14:20
The progress bar script that I made for my accessible form example. Works in modern browsers and IE9+. Read the blog post at http://sethlopez.me/article/understanding-accessibility-forms/.
/**
*
* Check out the example at http://sethlopez.me/article/understanding-accessibility-forms/.
*
* Copyright (c) 2015 Seth Lopez
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
@sethlopezme
sethlopezme / gist:bed911362eb67d92f33d
Created April 21, 2015 01:24
WeeChat Commands to Add Slack Servers
/server add <name> <team>.irc.slack.com/6667 -ssl -password=<password> -username=<username> -nicks=<username> -ssl_verify=off
/connect <name>
@sethlopezme
sethlopezme / _breakpoint.scss
Last active August 29, 2015 14:03
Updated breakpoint mixin to account for multiple types of media queries in one.
@mixin bp($queries, $type: only screen) {
$query-count: length($queries);
$media-statement: "#{$type} and";
@for $i from 1 through $query-count {
$query: nth($queries, $i);
$value: '';
$key: '';
@if length($query) == 1 or nth($query, 2) == up {
$key: min-width;
$value: if(map-has-key($bp, nth($query, 1)), px-em(map-get($bp, nth($query, 1))), px-em(nth($query, 1)));
@sethlopezme
sethlopezme / Preferences.sublime-settings
Last active August 29, 2015 14:02
My Sublime Text 3 Plugins and Settings
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_style": "phase",
"command": "alignment",
"font_face": "Source Code Pro",
"font_size": 9,
"highlight_line": true,
"highlight_modified_tabs": true,
@sethlopezme
sethlopezme / example.css
Last active August 29, 2015 14:00
Example gist to use for testing my website.
p {
color: red;
font-size: 2em;
}
p.bold {
font-weight: bold;
}
p.underline {
@sethlopezme
sethlopezme / _breakpoint.scss
Last active August 29, 2015 13:57
My breakpoint SASS mixin. Outputs em-based media queries & allows named breakpoints, use of up/down for min/max width, as well as a media option.
// Breakpoints - Outputs em-based media queries
@mixin bp($name, $expression: up, $type: only screen, $em-context: 16) {
// List unitless pixel-equivalent sizes here
$sizes: (
XS: 320,
S: 480,
M: 600,
L: 1000,
XL: 1200
);