Skip to content

Instantly share code, notes, and snippets.

@tmpvar
tmpvar / performance.js
Created March 31, 2010 00:58
very basic
/*
+------------+
| A |
+-[ ]----[ ]-+
| |
| V
| +------------+
| | B |
| +-[ ]--------+
| |
@tmpvar
tmpvar / cursor.js
Created April 3, 2010 01:25
a cider cursor possibility
(function(cider) {
cider.Cursor = function(editor) {
var hideDuration = 1000,
showDuration = 1000,
opacity = 0.5,
color = "#ff6600",
ctx = editor.getContext(),
interval = null // we can pause this, and expose show/hide
index 67d2bf8..b52c6b8 100644
--- a/index.html
+++ b/index.html
@@ -4,6 +4,7 @@
<head>
<title>Cider: Canvas Text Editor</title>
<script type="text/javascript" src="lib/cider.js"></script>
+ <script type="text/javascript" src="lib/cursor.js"></script>
<script type="text/javascript">
window.onload = function() {
Conduct({
A: ["_0", fs.readFile],
}, "A1")("/etc/passwd", function(data) {
// handle file data
})
@tmpvar
tmpvar / dashboard.php
Created April 5, 2010 00:28
tmpvar's project dashboard
<?php
ob_start();
if (count($_POST) > 0 && isset($_POST['payload'])) {
$obj = json_decode(stripcslashes($_POST['payload']), true);
$project = preg_replace('/[^a-zA-Z0-9_-]/', '', $obj['repository']['name']);
$cmd = "cd /srv/www/tmpvar.com/project/$project";
@tmpvar
tmpvar / composer.js
Created April 19, 2010 16:27
dom based composer
(function(window) {
var Composer = window.Composer = {
setup : function(el) {
$(el).find(".toolbar li").bind( "dragstart", function( event ){
// ref the "dragged" element, make a copy
tmpmac:unobtrusive.jsdom.org tmpvar$ node server/run.js
fs:55
binding.read(fd, buffer, offset, size - offset, offset || null, functi
^
Error: Offset is out of bounds
at doRead (fs:55:17)
at fs:78:7
at node.js:176:9
core.Entity = function(document, name) {
core.Node.call(this, document);
this._name = name;
this._nodeName = name;
this._tagName = name;
this._publicId = null;
this._systemId = null;
this._notationName = null;
this._nodeType = this.ENTITY_NODE;
this._readonly = true;
var bar = function() {
this._baz = function() {
return this.value;
};
};
bar.prototype = (function() {
var i_am_private = 2;