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
/** | |
* TechTouch #0b101 | |
* | |
*/ | |
$(function(){ | |
Deferred.define(); | |
loop(1000, function() { | |
$('body').append($('<div>').css({backgroundColor:'#' + Math.floor(Math.random() * Math.pow(16,6)).toString(16), | |
top:Math.random()* 300, |
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
/** | |
* TechTouch #0b101 | |
* | |
*/ | |
$(function() { | |
var id = setTimeout(function(){ | |
console.log('fire'); | |
},3000); | |
$("#cancel").click(function () { |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>TechTouch #0b101</title> | |
<script type="text/javascript" src="jquery-1.3.2.min.js"></script> | |
<script type="text/javascript" src="jsdeferred.js"></script> | |
<script type="text/javascript" src="tt.js"></script><!-- <<<<< change js --> | |
</head> | |
<body> | |
<div id="fire">fire</div> |
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
/** | |
* TexhTouch #0b101 | |
* | |
*/ | |
Deferred.define(); | |
function log(i) { | |
console.log(i); | |
} |
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
/** | |
* TechTouch #0b101 | |
* | |
*/ | |
$(function() { | |
Deferred.define(); | |
var deferred = Deferred(); | |
$("#fire").click(function () { | |
console.log('click fire'); |
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
/** | |
* TechTouch #0b101 | |
* | |
*/ | |
$(function() { | |
Deferred.define(); | |
var d = wait(3).next(function(){ | |
console.log('fire'); | |
}); |
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
b = "foo,bar,buzz,0,,1".split(',').map {|i| if i.size == 0 | |
nil | |
else | |
i | |
end }.compact | |
puts b | |
# >> foo | |
# >> bar | |
# >> buzz |
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
(face-equal 'region mell-region-face) | |
(face-equal mell-region-face 'sense-region-region-face) | |
(face-equal 'region 'sense-region-region-face) | |
(copy-face mell-region-face 'sense-region-region-face) | |
(copy-face 'sense-region-region-face 'region) |
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
(require 'sense-region) | |
(defadvice set-mark-command (around sense-region-set-mark-23 activate) | |
(if (and (mell-transient-region-active-p) | |
sense-region-mode) | |
(copy-face 'region 'sense-region-region-face)) | |
ad-do-it) | |
(sense-region-on) |
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
(defun sense-region-to-rectangle () | |
(interactive) | |
(setq sense-region-status 'rectangle) | |
(copy-face mell-region-face 'sense-region-face) ; for 23 uncomment | |
;;(copy-face 'default mell-region-face) | |
(mell-sign-reset-face mell-region-face) | |
) |