-
design (and everything) is teachable
- if you hear an engineer say, "I'm really bad at design," it's the same as hearing someone say, "I'm really bad at math"
-
focus on simplicity
- should make your life implementing simpler too
-
people's brains are bad at doing many things; don't overly burden them
-
eg, interface with so many calls to action that no one knows which to use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt --description 'Write out the prompt' | |
set git_sha (git rev-parse --short HEAD 2>/dev/null) | |
set git_branch (git rev-parse --abbrev-ref HEAD 2>/dev/null) | |
set git " $git_sha $git_branch " | |
if [ $git = ' ' ] | |
set git '' | |
end | |
set length (echo [ 00:00 AM -$git(prompt_pwd) ] | wc -c | tr -d ' ') | |
set fill (printf '%*s\n' (math (tput cols)-$length) '' | tr ' ' –) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var http = require('http') | |
, webapp = require('webapp'); | |
http.createServer(webapp.bind([])).listen(8000); | |
// ^^^^^^^^^^^^^^^ | |
// | (x) | |
// ROFLSCALE DEQUE ---/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-dss AAAAB3NzaC1kc3MAAACBANuU42yktRzN/NMEA6mABmTO5ktVoMHcEV34k0aAntOGg3axhDV29gA+VXH5X5wPIMvm/Ua/bt3YURpxoy+auWd8h8dXjj1C8+f0Zbhwr+uZqKRYdxqKRkwlnc7tzu6VHEdS8qwwwMKr5vZ6djSJl4bKEiGX4Ms7TflUOuYMGIL9AAAAFQCu2MwxtR6VnWLkCActtYAVKEegbwAAAIAO5wRvfJG1pzkcNQoVaMjxB6/fKS2U8mAYD0AsnKYOHFBYA4BMeUrOi9qG3OhmGEuISA8vduJZq8J9uK52mXFkx9+JmpnGdUYMdAaPA/BcaFnja2x+PSlxYcSk+GHFUqk1L5m5EdSbG08+QnNHFHFHt0f8qtg2hF0B2Kp0M6a2iAAAAIB5A6D8dGJzIkXm46IeRPaLpbO7QplJQEJ0mydpHNFph/koWeWTmVvKYIzDvuWnCKGPfB/ZkB6z6Id44JSobh0Qhlgfi/eLaJmHodiIF8CBJZEEA4UpuFAcHtBVNShBVwolSkn8YvMmI3TkQl9KBtwge+V6QZVs+BoqRYfIL+rbAg== visnup@visnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install: --no-rdoc |
Just a little proof-of-concept here - using an SVG <foreignObject>
element as a container for a tooltip that can involve handy HTML features like text-wrapping and (semi-)dynamic sizing.
Gotchas so far:
-
Like an
<svg>
element, a<foreignObject>
element needs a width and a height in order to be rendered. -
However, specifying
width
and/orheight
can be delayed. Here I specify a width (foWidth
) of 300px, then find the height of the contained<div>
usinggetBoundingClientRect()
and use that to specify the height of the containing<foreignObject>
.