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
User | |
id | |
name | |
Thread | |
id | |
Message | |
id | |
thread_id |
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 coffee | |
http = require("http") | |
url = require("url") | |
path = require("path") | |
fs = require("fs") | |
# cluster = require("cluster") | |
port = process.argv[2] or 8888 | |
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
// Bounce every view that you click on | |
View.Views.map(function(view) { | |
view.on("click", function(e) { | |
e.stopPropagation() | |
view.animateStop() | |
view.scale = 0.5 |
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
def preBuild(site): | |
from django.conf import settings | |
if "typogrify" not in settings.INSTALLED_APPS: | |
settings.INSTALLED_APPS.append("typogrify") |
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
- A graph of your wallet net worth over time | |
- An unrealized gains table listing your bitcoin buy prices and the current worth | |
- Reserve "buckets" in your wallet that can only be touched with a special code | |
- 3rd party access codes that can only access specific buckets in your wallet |
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
var myCanvasView = new View({ | |
x:100, y:100, | |
width:200, height:200 | |
}) | |
// Add a nice background color so we see it | |
myCanvasView.style.backgroundColor = "rgba(255,0,0,.5)" | |
// This is the tricky bit, we create a canvas element (so we have a reference to it) and insert it into the view |
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
myView = new View x:50, y:100, width:150, height:150 | |
myView.style.backgroundColor = "red" | |
myView.html = "HELLO" | |
draggable = new ui.Draggable myView | |
myView.on Events.DragStart, -> console.log "myView", Events.DragStart | |
myView.on Events.DragMove, -> console.log "myView", Events.DragMove | |
myView.on Events.DragEnd, -> console.log "myView", Events.DragEnd |
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
endScrollMomentum = function(event) { | |
var animation, constant1, constant2, totalVelocity, touchEvent, velocity; | |
touchEvent = Events.sanitize(event); | |
constant1 = 1000; | |
constant2 = 0; | |
velocity = dragger.calculateVelocity(); |
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
// To make images retina, add a class "2x" to the img element | |
// and add a <image-name>@2x.png image. Assumes jquery is loaded. | |
function isRetina() { | |
var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\ | |
(min--moz-device-pixel-ratio: 1.5),\ | |
(-o-min-device-pixel-ratio: 3/2),\ | |
(min-resolution: 1.5dppx)"; | |
if (window.devicePixelRatio > 1) |
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
What is Framer | |
Prototyping toolkit. | |
--- | |
Why did I make Framer | |
Because prototyping is important. |