When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
// go to https://aws.amazon.com/ec2/pricing/on-demand/ and run this in console | |
(() => { | |
let table = document.querySelector('div.js-active').children[0]; | |
let bodies = table.getElementsByTagName('tbody'); | |
bodies = Array.from(bodies); | |
bodies = bodies.map((b) => Array.from(b.children)); | |
let rows = bodies.reduce((acc, x) => [...acc, ...Array.from(x.slice(1)).map((r) => [x[0].children[0].innerText, ...Array.from(r.children).map((c) => c.innerText)])], []); | |
let data = rows.map(([type, name, vcpu, ecu, memory, storage, price]) => ({ name, vcpu, ecu, memory, storage, price, type })); | |
data.sort(({ price: priceA }, { price: priceB }) => parseFloat(priceB.substr(1)) - parseFloat(priceA.substr(1))); | |
data.forEach(({name, vcpu, ecu, memory, storage, price, type }) => console.log(`price: ${price} name: ${name} - vcpus: ${vcpu} - ecu: ${ecu} - memory: ${memory} - storage: ${storage} - type: ${type}`)); |
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?
Install portaudio using homebrew (or method of your choice)
brew install portaudio
create $HOME/.pydistutils.cfg using the include
and lib
directories of your portaudio install:
[build_ext]
<html> | |
<body> | |
//Note the value attribute rather than ng-model | |
<spin value="someScopeValue" min="1" max="{{someOtherScopeValue}}" step="2" /> | |
$scope.someScopeValue = 2; | |
$scope.someOtherScopeValue = 20; | |
</body> |
package controllers | |
import play.api.mvc._ | |
object Application extends Controller { | |
def upload = Action(parse.multipartFormData) { | |
request => | |
if (request.body.files.isEmpty) BadRequest("Invalid file!") | |
else if (request.body.asFormUrlEncoded.isEmpty) BadRequest("Invalid data!") | |
else Ok("Everything is okay!") |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.