This is a list of the SublimeText 2 addons I use for my development environment.
// Create a simple top to bottom linear gradient with a background-color backup | |
// The first argument, $color will be output as background-color: $color | |
// | |
// This yields a gradient that is 5% brighter on the top and 5% darker on the bottom | |
// | |
// +gradient-bg(#777) | |
// | |
// This yeilds a gradient where the bright and dark colors are shifted 10% from the original color. | |
// If you don't specify a third argument it will assign this value for the darkness too, keeping the gradient even. | |
// |
<?php | |
class DogsController extends BaseController { | |
protected $db; | |
// Let the db-layer be injected. Don't worry... | |
// Laravel will automatically inject the dependencies for you. | |
function __construct(DogInterface $db) { | |
$this->db = $db; | |
} |
There is no set-out workflow for responsive design yet - everyone is 'winging it'
Photoshop has become a dirty word, but it still has its place
- 56% of people said workflow has completely changed
- 64% of people are integrating is as part of service, not additional feature
- 65% of people work to common breakpoints
$foo: 1; | |
$bar: 6; | |
@while $foo < $bar { | |
h#{$foo} { // do something | |
font-size: ($bar - $foo)+em; | |
} | |
$foo: $foo + 1; // advance a counter | |
} |
<?php # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Silent Flush | |
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten. | |
* Version: 2013.05.04 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.
That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons:
- Short-Term Reliability. With Tabletop, your project depends on Google not to rate-limit access to your spreadsheet. Google rate-limits access to their Spreadsheet API, though the thresholds aren't clear. If you're building an app you care about, you don't want to be i
document.addEventListener('click', function (evt) { | |
if (evt.target.className === 'bp3-icon bp3-icon-filter') { | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function removeFilters(event) { | |
var filteredButtons = event.target.parentElement.parentElement.parentElement.getElementsByTagName('BUTTON') | |
if (filteredButtons.length == 0 || filteredButtons == null) { return } |
Black: 0, 0, 0 | |
Red: 229, 34, 34 | |
Green: 166, 227, 45 | |
Yellow: 252, 149, 30 | |
Blue: 196, 141, 255 | |
Magenta: 250, 37, 115 | |
Cyan: 103, 217, 240 | |
White: 242, 242, 242 |
(see YouTube channel for individual videos)