Skip to content

Instantly share code, notes, and snippets.

@mklickman
mklickman / cell-colors.css
Created May 30, 2014 19:17
Replacement cell color styles for http://kangax.github.io/compat-table/es6/ (Chrome users, check out the Stylebot extension if you haven't already). Edit color values as needed.
.yes {
background: #75c073;
}
#table-wrapper tr:hover td.yes, #table-wrapper td.hover.yes {
background: #5ba059;
}
.no {
background: e68484;
@mklickman
mklickman / bootstrap-toggle.sublime-snippet
Last active August 29, 2015 14:20
Bootstrap Toggle Switch Snippet
<div class="form-group-input">
<div class="btn-group btn-group-justified" data-toggle="buttons">
<label class="btn btn-default" ng-class="{active: ${1:} === ${2:} }">
<input type="radio" ng-model="${1:}" ng-value="${2:}"> ${4:}
</label>
<label class="btn btn-default" ng-class="{active: ${1:} === ${3:} }">
<input type="radio" ng-model="${1:}" ng-value="${3:}"> ${5:}
</label>
</div><!-- .btn-group -->
</div><!-- .form-group-input -->
@mklickman
mklickman / trello-simple-dashboard.css
Last active May 5, 2019 11:59
Trello Dashboard: Hide "Starred Boards" and "My Boards" sections, and "Create New Board..." blocks
/***
If you're like me, and like to organize your Trello boards by team, you
might not want to see the default "Starred Boards" and "My Boards"
sections that show up on your dashboard. For me, they just get in the way,
and I would rather just see my boards organized by teams ("Client Work",
"Side Projects", "Tabled Projects", etc.).
Here's a set of styles you can drop into Stylebot (broowser extension that
lets you add custom CSS to any site in your borwser) to do just that. Enjoy!
@mklickman
mklickman / base.scss
Last active May 19, 2016 19:10
A set of example SCSS files which summarize the "components-patterns-views" CSS architecture paradigm outlined in this article from thoughtbot: https://robots.thoughtbot.com/architecting-front-end-styles
// WHAT GOES IN THIS FILE:
//
// - Raw HTML elements (no classes)
// - Any non-rendering SASS (i.e. mixins and functions)
//
// EXAMPLES:
body { }
a { }
@mklickman
mklickman / app.js
Last active June 23, 2016 19:29
Browserify error from ui-router
require('angular');
require('angular-ui-router');
require('./gg-root.js');
require('./gg-routes.js');
@mklickman
mklickman / app.component.js
Last active July 12, 2016 20:03
browserify ES2015 woes
const AppComponent = {
template: `
<div class="app-component-root">
<div ui-view></div>
</div>
`,
};
export default AppComponent;
<div class="app-root" ng-controller="rootController">
<div class="carousel">
<!--
I have a UI Bootstrap carousel with some slides in it. Each slide
needs to be both clickable and swipeable, with a mouse (this problem
is not an issue on mobile).
The problem I'm having is that when you swipe with a mouse click,
letting the mouse up at the end of the swipe will trigger the click
@mklickman
mklickman / local-production-rake-output.txt
Last active March 22, 2017 14:23
Heroku production errors
$ RAILS_ENV=production bundle exec rake -P
syck has been removed, psych is used instead
rake about
environment
rake assets:clean
environment
tmp:cache:clear
rake assets:precompile
rake db:abort_if_pending_migrations
environment
@mklickman
mklickman / student-form.ts
Created October 21, 2017 17:13
Angular reactive form with conditionally pre-set data
import { Component, OnInit } from '@angular/core';
import { NavParams } from 'ionic-angular';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { StudentsProvider } from '../../../providers/students-provider';
@Component({
selector: 'student-form',
templateUrl: 'student-form.html'
})
export class StudentForm implements OnInit {
.button {
box-sizing: border-box;
display: inline-block;
border: 1px solid transparent;
border-radius: 8px;
font-family: 'karla';
font-size: 1.375rem;
line-height: 1;
text-align: center;
padding: 1.25rem 1.75rem;