Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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;

Keybase proof

I hereby claim:

  • I am mklickman on github.
  • I am mklickman (https://keybase.io/mklickman) on keybase.
  • I have a public key whose fingerprint is 4B82 1E9C 338E 8F7A 9DEA 5264 97E1 534E DD8A 32AC

To claim this, I am signing this object:

@mklickman
mklickman / text-input-handler.js
Last active December 29, 2015 17:59
Updates font size of input text to make it fit the entire field instead of overflowing. May need some tweaking to be entirely portable.
$('input[type="text"]').bind("propertychange keyup input paste", function(event){
var len = $(this).val().length;
if (len >= 13){
letters = len - 13;
percentage = letters/34;
fontsize = Math.round(57-45*percentage);
@mklickman
mklickman / interval.js
Created November 15, 2013 15:57
A smarter alternative to JavaScript's built-in setInterval() method, courtesy of this article: http://www.thecodeship.com/web-development/alternative-to-javascript-evil-setinterval
function interval(func, wait, times){
var interv = function(w, t){
return function(){
if(typeof t === "undefined" || t-- > 0){
setTimeout(interv, w);
try{
func.call(null);
}
catch(e){
t = 0;
var reset_comment_parent = function() {
// CODE...
}
$('.add_form', '.close_comment_form').on('click', reset_comment_parent);
// This...
(function($) {
$('body').css('background', 'red');
})(jQuery)
// is the same as this...
var myFunction = function($) {
// Attatch an event listener to your element for when the first animation
// finishes, but only when it's named for the first animation
$('.my-element').on('animationend', function() {
if ($(this).css('animation-name') == "animation-1") {
// Change the CSS animation-name property for the 2nd animation
$(this).css('animation-name', 'animation-2');
}
});
@mklickman
mklickman / win8-tile.sublime-snippet
Created February 27, 2013 15:00
This snippet inserts the three meta tags used to specify what image, background color, and name to use when your site is pinned to the Windows 8 start screen.
<snippet>
<content><![CDATA[
<!-- For details, see http://hicksdesign.co.uk/journal/pinned-sites-in-windows-8 -->
<meta name="msapplication-TileImage" content=“${1:filename.png}”>
<meta name="msapplication-TileColor" content="#${2:hex-value}”>
<meta name="application-name" content=${3:Win8-specific application title}”>
]]></content>
<description>Windows 8 tile specification for pinning to start screen</description>
<tabTrigger>win8tile</tabTrigger>
<scope>text.html</scope>