Test with
$ sbt run
And then,
$ curl localhost:8080/mars/hi
$ curl localhost:8080/jupiter/hi
/* | |
* Inspired by: | |
* http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* This script is ideal for getting specific class depending on device width | |
* for enhanced theming. Media queries are fine in most cases but sometimes | |
* you want to target a specific JQuery call based on width. This will work | |
* for that. Be sure to put it first in your script file. Note that you could | |
* also target the body class instead of 'html' as well. | |
* Modify as needed |
Test with
$ sbt run
And then,
$ curl localhost:8080/mars/hi
$ curl localhost:8080/jupiter/hi
#!/usr/bin/env node | |
'use strict'; | |
/* | |
This is a simple Spotify cli-based client with optional Icecast2/shout support! | |
It should work for non-premium users, but you must connect your Spotify account to Facebook. | |
Usage: | |
$ node spotify <spotify uris> <playlist uri> <album uri> <track uri> <etc...> |
var reflowDocument = function () { | |
var viewportWidth = jQuery(window).width(); | |
// do stuff here | |
}; | |
jQuery(document).ready(function($) { | |
var reflowTimer = null; | |
$(window).on('resize', function () { |
/* | |
* | |
* Originally inspired by: http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* Original source by https://gist.github.com/highrockmedia/3710930 | |
* | |
* My contribution: I re-wrote some code it to fire as one function, so you're only editing values in one place. | |
* | |
*/ |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
// http://deploytonenyures.blogspot.fr/2015/11/es6-proxies-part-ii.html | |
//to run it in node.js 4 it should be just this flag: --harmony_proxies | |
//but does not seem to work, so run it in Firefox | |
var cat = { | |
name: "Kitty", | |
method1: function(msg){ | |
console.log("cat: " + this.name + ", method1 invoked with msg: " + msg); | |
this.method2(msg); | |
}, |