I hereby claim:
- I am netlemur on github.
- I am netlemur (https://keybase.io/netlemur) on keybase.
- I have a public key ASAT1gpxdxGD6Qa5IFTme6Lq1qrrzdK2mZjCXundJlmr2Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
What if controlling your media queries was as easy as adding on to a Sass list? What if I told you it now is?
This snippet comes from a modified version of mixins in the Aura Responsive Framework and came from me hijacking the respond-to mixin namespace but still wanting to use it for custom media queries. It's a little ugly and requires Sass 3.2+ (for now, (sudo) gem install sass --pre)
, but it works a charm.
There are two fairly mundane caveats to this method. First, every media query needs to be named. Second, every media query needs a size and assumes min-width and screen. If you want to change min-width, simply add your operator as another option, but if you want to change screen, you need to also include your operator even if you want it to be min-width.
Also, I haven't built in warnings yet for when you do bad things, so bear that in mind.
Without further adue, tada.
body { | |
font-family: "Helvetica Neue", sans-serif; | |
line-height: 1.55em; | |
} | |
h1,h2 { | |
line-height: 1.2em; | |
} |
/* | |
> db.events.find() | |
{ | |
"user_id" : ObjectId("4e75ed8dd4512cd934000002"), | |
"name" : "Event name", | |
"location" : ObjectId("4e7650b52fac20345d000007"), | |
"_id" : ObjectId("4e7686bb05a7b00000000009") | |
} | |
*/ |
var os = require('os'), | |
prevTimes; | |
function getCpuTimes() { | |
var cpus = os.cpus(), | |
times = { | |
cores: cpus.length | |
, user: 0 | |
, sys : 0 | |
, nice: 0 |